Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Net / System / Net / GlobalProxySelection.cs / 1 / GlobalProxySelection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net { [Obsolete("This class has been deprecated. Please use WebRequest.DefaultWebProxy instead to access and set the global default proxy. Use 'null' instead of GetEmptyWebProxy. http://go.microsoft.com/fwlink/?linkid=14202")] public class GlobalProxySelection { // This just wraps WebRequest.DefaultWebProxy and modifies it to be compatible with Everett. // It needs to return a WebProxy whenever possible, and an EmptyWebProxy instead of null. public static IWebProxy Select { get { IWebProxy proxy = WebRequest.DefaultWebProxy; if (proxy == null) { return GetEmptyWebProxy(); } WebRequest.WebProxyWrapper wrap = proxy as WebRequest.WebProxyWrapper; if (wrap != null) { return wrap.WebProxy; } return proxy; } set { WebRequest.DefaultWebProxy = value; } } public static IWebProxy GetEmptyWebProxy() { return new EmptyWebProxy(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net { [Obsolete("This class has been deprecated. Please use WebRequest.DefaultWebProxy instead to access and set the global default proxy. Use 'null' instead of GetEmptyWebProxy. http://go.microsoft.com/fwlink/?linkid=14202")] public class GlobalProxySelection { // This just wraps WebRequest.DefaultWebProxy and modifies it to be compatible with Everett. // It needs to return a WebProxy whenever possible, and an EmptyWebProxy instead of null. public static IWebProxy Select { get { IWebProxy proxy = WebRequest.DefaultWebProxy; if (proxy == null) { return GetEmptyWebProxy(); } WebRequest.WebProxyWrapper wrap = proxy as WebRequest.WebProxyWrapper; if (wrap != null) { return wrap.WebProxy; } return proxy; } set { WebRequest.DefaultWebProxy = value; } } public static IWebProxy GetEmptyWebProxy() { return new EmptyWebProxy(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DbBuffer.cs
- ToolStripDropDownItem.cs
- QilXmlWriter.cs
- TextFormatter.cs
- Parsers.cs
- FontNamesConverter.cs
- Panel.cs
- PreservationFileReader.cs
- DataGridViewCellMouseEventArgs.cs
- TextHidden.cs
- HttpModulesSection.cs
- ResXBuildProvider.cs
- ArcSegment.cs
- TypeSystemProvider.cs
- WindowsMenu.cs
- RawMouseInputReport.cs
- FrugalList.cs
- CommonBehaviorsSection.cs
- DeploymentExceptionMapper.cs
- ToolStripDropDownClosingEventArgs.cs
- DeferredReference.cs
- WorkflowViewElement.cs
- Environment.cs
- SerializableAuthorizationContext.cs
- MultiTargetingUtil.cs
- CodeFieldReferenceExpression.cs
- ComponentChangedEvent.cs
- SamlAttributeStatement.cs
- ComEventsMethod.cs
- ClientBuildManager.cs
- EntityType.cs
- SchemaCollectionCompiler.cs
- SpeechSynthesizer.cs
- SafeFreeMibTable.cs
- DoubleUtil.cs
- COSERVERINFO.cs
- SimplePropertyEntry.cs
- TextTreeFixupNode.cs
- RtfToXamlReader.cs
- MimeFormReflector.cs
- XmlAttributeOverrides.cs
- DataGridColumnCollection.cs
- ServiceDescriptionSerializer.cs
- ApplicationId.cs
- Misc.cs
- AppDomain.cs
- ButtonChrome.cs
- DataBinding.cs
- DeclarativeCatalogPartDesigner.cs
- SmiConnection.cs
- FixedPageStructure.cs
- FrameSecurityDescriptor.cs
- SnapshotChangeTrackingStrategy.cs
- DiagnosticsConfiguration.cs
- SequentialWorkflowRootDesigner.cs
- PrintDialog.cs
- HMACSHA384.cs
- IntegrationExceptionEventArgs.cs
- MenuItem.cs
- LoginViewDesigner.cs
- MimeMultiPart.cs
- WindowsListViewItem.cs
- FilteredXmlReader.cs
- XsdCachingReader.cs
- sitestring.cs
- ExcludePathInfo.cs
- WebPartCloseVerb.cs
- HostProtectionException.cs
- DataGridViewColumnCollectionEditor.cs
- WebPartManagerDesigner.cs
- WebException.cs
- CharStorage.cs
- FullTextBreakpoint.cs
- SmtpAuthenticationManager.cs
- DecoderReplacementFallback.cs
- updatecommandorderer.cs
- GatewayDefinition.cs
- AssociationSetEnd.cs
- InheritanceContextHelper.cs
- XpsFilter.cs
- LinqDataSourceView.cs
- RadioButtonRenderer.cs
- TreeNode.cs
- SqlGatherConsumedAliases.cs
- XsdCachingReader.cs
- HashAlgorithm.cs
- DesignTimeValidationFeature.cs
- XmlValidatingReaderImpl.cs
- rsa.cs
- PrintDialog.cs
- ResourcePermissionBaseEntry.cs
- GatewayDefinition.cs
- GridViewCancelEditEventArgs.cs
- Type.cs
- TitleStyle.cs
- RepeatBehaviorConverter.cs
- Debug.cs
- CustomWebEventKey.cs
- WindowsMenu.cs
- HttpRequestWrapper.cs