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
- AffineTransform3D.cs
- BatchParser.cs
- IsolatedStorageFilePermission.cs
- HtmlControlPersistable.cs
- SoapAttributes.cs
- EventRouteFactory.cs
- Image.cs
- ObjectContextServiceProvider.cs
- GenericWebPart.cs
- DataGridCommandEventArgs.cs
- AssemblyResourceLoader.cs
- WebControlsSection.cs
- DigestTraceRecordHelper.cs
- PrintEvent.cs
- CodeMethodReturnStatement.cs
- DCSafeHandle.cs
- ToolStripItemTextRenderEventArgs.cs
- ProjectionAnalyzer.cs
- Size3D.cs
- precedingsibling.cs
- TextFormatterImp.cs
- Vector3DAnimationBase.cs
- OleDbStruct.cs
- Stylus.cs
- DesignTimeParseData.cs
- CommandHelpers.cs
- FlagsAttribute.cs
- TransactionContextValidator.cs
- LockCookie.cs
- FileBasedResourceGroveler.cs
- ScaleTransform.cs
- EarlyBoundInfo.cs
- SemaphoreSecurity.cs
- ClaimSet.cs
- CSharpCodeProvider.cs
- SoapHeaderAttribute.cs
- MenuItemStyle.cs
- WebPartChrome.cs
- ContractReference.cs
- XsltQilFactory.cs
- SecurityDocument.cs
- MatrixAnimationBase.cs
- ObjectToken.cs
- EncoderBestFitFallback.cs
- XhtmlTextWriter.cs
- RulePatternOps.cs
- PointHitTestParameters.cs
- HttpAsyncResult.cs
- PointAnimationBase.cs
- updatecommandorderer.cs
- WebPartsSection.cs
- SlipBehavior.cs
- TakeQueryOptionExpression.cs
- SetStoryboardSpeedRatio.cs
- Line.cs
- indexingfiltermarshaler.cs
- WebPartConnectionsCancelVerb.cs
- SelectionService.cs
- FullTextState.cs
- Identity.cs
- ProcessManager.cs
- infer.cs
- AuthenticationServiceManager.cs
- FormatterServices.cs
- UnsafeNativeMethods.cs
- QueryAccessibilityHelpEvent.cs
- MatrixConverter.cs
- JsonDataContract.cs
- Identifier.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- CornerRadiusConverter.cs
- InternalBase.cs
- ItemDragEvent.cs
- ExtensionDataReader.cs
- CurrencyWrapper.cs
- HyperLinkColumn.cs
- TreeView.cs
- TreeNodeStyleCollection.cs
- HostedImpersonationContext.cs
- VectorCollectionValueSerializer.cs
- CopyAttributesAction.cs
- BufferedGraphicsManager.cs
- ListSortDescriptionCollection.cs
- SqlAliaser.cs
- EarlyBoundInfo.cs
- Single.cs
- TypeToStringValueConverter.cs
- MimeReflector.cs
- TreeWalker.cs
- ResourceType.cs
- GenerateScriptTypeAttribute.cs
- SqlError.cs
- SqlDataSourceStatusEventArgs.cs
- XslTransform.cs
- CharAnimationUsingKeyFrames.cs
- ChameleonKey.cs
- AutoGeneratedField.cs
- ProvidersHelper.cs
- PanelDesigner.cs
- httpstaticobjectscollection.cs