Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- OracleCommandBuilder.cs
- InputEventArgs.cs
- RSAOAEPKeyExchangeFormatter.cs
- DataViewSetting.cs
- CurrentChangedEventManager.cs
- DynamicUpdateCommand.cs
- DocumentPageView.cs
- ContextMenu.cs
- TextLineResult.cs
- EventHandlingScope.cs
- AdRotator.cs
- DataGridCaption.cs
- JoinGraph.cs
- X509WindowsSecurityToken.cs
- QilScopedVisitor.cs
- QilIterator.cs
- AppModelKnownContentFactory.cs
- CodeTypeDelegate.cs
- RestClientProxyHandler.cs
- SmiTypedGetterSetter.cs
- PathFigureCollectionConverter.cs
- MemberAccessException.cs
- WebPartChrome.cs
- SafeHandles.cs
- PrinterResolution.cs
- SmtpTransport.cs
- OnOperation.cs
- ErrorStyle.cs
- prompt.cs
- PropertyChangeTracker.cs
- ValidationErrorEventArgs.cs
- PositiveTimeSpanValidatorAttribute.cs
- Authorization.cs
- arclist.cs
- IPAddress.cs
- LinkConverter.cs
- DecoderNLS.cs
- AuthenticatingEventArgs.cs
- ScrollEvent.cs
- Unit.cs
- SHA256Cng.cs
- WebPartConnection.cs
- DependencyPropertyHelper.cs
- EventLogQuery.cs
- ListenerElementsCollection.cs
- CodeCommentStatement.cs
- MarkupCompiler.cs
- IdnElement.cs
- ScrollEventArgs.cs
- WeakReferenceList.cs
- HttpCookie.cs
- HttpChannelBindingToken.cs
- Stylus.cs
- XPathExpr.cs
- ClientUtils.cs
- NullableBoolConverter.cs
- SqlException.cs
- Accessors.cs
- TransformProviderWrapper.cs
- DomNameTable.cs
- DataSvcMapFile.cs
- AppLevelCompilationSectionCache.cs
- thaishape.cs
- InstanceContext.cs
- XsdBuilder.cs
- ThemeableAttribute.cs
- xmlNames.cs
- VScrollProperties.cs
- LambdaCompiler.cs
- CompositionAdorner.cs
- Fx.cs
- DelayedRegex.cs
- Lasso.cs
- ZipIOExtraFieldZip64Element.cs
- WCFServiceClientProxyGenerator.cs
- ECDiffieHellmanPublicKey.cs
- ContentElement.cs
- PasswordBoxAutomationPeer.cs
- ZipFileInfo.cs
- PublisherIdentityPermission.cs
- ColumnResizeAdorner.cs
- EditorZoneBase.cs
- ApplicationException.cs
- CommandEventArgs.cs
- EntityStoreSchemaGenerator.cs
- ImageClickEventArgs.cs
- Brush.cs
- XmlTextAttribute.cs
- SystemMulticastIPAddressInformation.cs
- EUCJPEncoding.cs
- PenContext.cs
- SQLDouble.cs
- SerialPort.cs
- Unit.cs
- KeyTime.cs
- DiscardableAttribute.cs
- GeometryHitTestParameters.cs
- CookieHandler.cs
- SafeMarshalContext.cs
- BridgeDataReader.cs