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
- ComboBox.cs
- QuaternionRotation3D.cs
- ConnectionPointCookie.cs
- OrCondition.cs
- ProcessingInstructionAction.cs
- DefaultEventAttribute.cs
- Int32EqualityComparer.cs
- KeyToListMap.cs
- QueryResponse.cs
- BamlCollectionHolder.cs
- WorkflowInstanceUnhandledExceptionRecord.cs
- AttributedMetaModel.cs
- TransactionException.cs
- MarkedHighlightComponent.cs
- InsufficientMemoryException.cs
- Brush.cs
- ProgressBarAutomationPeer.cs
- IssuerInformation.cs
- PageHandlerFactory.cs
- SqlXmlStorage.cs
- AppDomain.cs
- ComboBox.cs
- PropertyTabAttribute.cs
- Bitmap.cs
- DbConnectionOptions.cs
- StorageMappingFragment.cs
- ElementNotEnabledException.cs
- ArgIterator.cs
- XmlSchemaAny.cs
- RequiredFieldValidator.cs
- SafeFindHandle.cs
- ChameleonKey.cs
- DPCustomTypeDescriptor.cs
- LZCodec.cs
- ManualWorkflowSchedulerService.cs
- DelayedRegex.cs
- EllipticalNodeOperations.cs
- BulletedList.cs
- FrugalMap.cs
- EraserBehavior.cs
- SoapAttributes.cs
- DataServiceQueryProvider.cs
- Freezable.cs
- AutoSizeToolBoxItem.cs
- ClientCredentialsElement.cs
- OdbcErrorCollection.cs
- BuildProvider.cs
- RequestCachingSection.cs
- FormatConvertedBitmap.cs
- KeyConverter.cs
- CollectionEditor.cs
- RegexGroupCollection.cs
- DataRelationPropertyDescriptor.cs
- UnsafeNativeMethods.cs
- EnumValAlphaComparer.cs
- SR.cs
- AdRotatorDesigner.cs
- BaseCollection.cs
- CachedFontFace.cs
- RelationshipEndCollection.cs
- InvalidOperationException.cs
- ComponentCommands.cs
- ThreadSafeList.cs
- SigningCredentials.cs
- Convert.cs
- ToolboxItemAttribute.cs
- TableLayoutSettingsTypeConverter.cs
- ByteRangeDownloader.cs
- NavigationEventArgs.cs
- ChtmlSelectionListAdapter.cs
- EmptyCollection.cs
- ExtensionQuery.cs
- EntityViewContainer.cs
- ConfigXmlText.cs
- Italic.cs
- IndicShape.cs
- PropertyTab.cs
- WindowsGraphicsCacheManager.cs
- ScrollChrome.cs
- Overlapped.cs
- PageRanges.cs
- ADMembershipProvider.cs
- AssemblySettingAttributes.cs
- BlockExpression.cs
- MetadataItemEmitter.cs
- ProfileSection.cs
- XmlSchemaNotation.cs
- DelayedRegex.cs
- OpenTypeLayout.cs
- LocalTransaction.cs
- LiteralControl.cs
- AssemblyResourceLoader.cs
- AudienceUriMode.cs
- DataControlImageButton.cs
- PropertyGeneratedEventArgs.cs
- ProtocolsConfigurationHandler.cs
- CodeExporter.cs
- ApplicationSecurityInfo.cs
- ThreadAbortException.cs
- SpinLock.cs