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
- If.cs
- SerializationEventsCache.cs
- RuntimeIdentifierPropertyAttribute.cs
- TTSEvent.cs
- DataGridAutoFormat.cs
- Activity.cs
- SerializerWriterEventHandlers.cs
- DataRowChangeEvent.cs
- FolderLevelBuildProviderCollection.cs
- PropertyInfo.cs
- StorageFunctionMapping.cs
- TextElementEnumerator.cs
- HighContrastHelper.cs
- FactoryGenerator.cs
- Baml2006ReaderFrame.cs
- RegionInfo.cs
- ContainerVisual.cs
- FontFaceLayoutInfo.cs
- ListViewGroupConverter.cs
- XmlUtf8RawTextWriter.cs
- OptimalTextSource.cs
- FormViewRow.cs
- Int64AnimationUsingKeyFrames.cs
- Semaphore.cs
- DotNetATv1WindowsLogEntrySerializer.cs
- X509Certificate2.cs
- MetadataWorkspace.cs
- _UriTypeConverter.cs
- HttpProfileBase.cs
- TransformerConfigurationWizardBase.cs
- CacheOutputQuery.cs
- TargetPerspective.cs
- CommonDialog.cs
- Expression.DebuggerProxy.cs
- MissingMemberException.cs
- RectangleGeometry.cs
- EnumType.cs
- ZoneLinkButton.cs
- InkPresenterAutomationPeer.cs
- AstTree.cs
- ColumnResizeAdorner.cs
- ParentControlDesigner.cs
- StrongNameMembershipCondition.cs
- BigInt.cs
- MetadataWorkspace.cs
- ResourceDisplayNameAttribute.cs
- SqlBuffer.cs
- RevocationPoint.cs
- MostlySingletonList.cs
- VisualTreeHelper.cs
- DelegateSerializationHolder.cs
- DesignerToolStripControlHost.cs
- SQLBoolean.cs
- CodeExporter.cs
- MouseOverProperty.cs
- PersonalizationStateQuery.cs
- StateChangeEvent.cs
- CollaborationHelperFunctions.cs
- ConfigXmlSignificantWhitespace.cs
- CaretElement.cs
- SpecularMaterial.cs
- InboundActivityHelper.cs
- SchemaLookupTable.cs
- DropSource.cs
- ReachObjectContext.cs
- DataGridViewRowsAddedEventArgs.cs
- ButtonStandardAdapter.cs
- ChtmlCalendarAdapter.cs
- PlainXmlDeserializer.cs
- VectorCollectionConverter.cs
- RequestCacheManager.cs
- FileDataSourceCache.cs
- XmlElementAttributes.cs
- SessionEndingEventArgs.cs
- SqlBinder.cs
- DataGridViewCellFormattingEventArgs.cs
- BrushValueSerializer.cs
- Types.cs
- ClientUtils.cs
- DirectoryObjectSecurity.cs
- HttpApplicationFactory.cs
- EventHandlingScope.cs
- MasterPageParser.cs
- FieldMetadata.cs
- TableSectionStyle.cs
- GPStream.cs
- TargetParameterCountException.cs
- BadImageFormatException.cs
- Matrix3DConverter.cs
- Script.cs
- CollectionsUtil.cs
- WebResponse.cs
- IpcManager.cs
- OrthographicCamera.cs
- XmlElementAttributes.cs
- PartitionedDataSource.cs
- RuntimeConfigLKG.cs
- CqlErrorHelper.cs
- ProxyWebPart.cs
- GC.cs