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
- PreservationFileWriter.cs
- ImageFormat.cs
- KnownIds.cs
- UnknownBitmapEncoder.cs
- TextReader.cs
- ConfigurationLocationCollection.cs
- TemplateBuilder.cs
- ConfigurationManager.cs
- InlineObject.cs
- DataMemberAttribute.cs
- StringInfo.cs
- StylusDevice.cs
- EnlistmentState.cs
- BinarySerializer.cs
- SupportingTokenProviderSpecification.cs
- XmlUtil.cs
- DataObjectCopyingEventArgs.cs
- EventArgs.cs
- SchemaTableColumn.cs
- RegexGroup.cs
- OracleConnection.cs
- PenLineCapValidation.cs
- DataGridColumnCollection.cs
- Attributes.cs
- DataPagerFieldCollection.cs
- AsnEncodedData.cs
- ADMembershipUser.cs
- HtmlInputFile.cs
- DataMisalignedException.cs
- CachedCompositeFamily.cs
- SqlBooleanizer.cs
- PageVisual.cs
- Control.cs
- CrossAppDomainChannel.cs
- UriTemplateLiteralQueryValue.cs
- FormatException.cs
- EventLog.cs
- StaticTextPointer.cs
- WebPartVerbsEventArgs.cs
- RijndaelCryptoServiceProvider.cs
- IItemProperties.cs
- _AutoWebProxyScriptHelper.cs
- messageonlyhwndwrapper.cs
- DefaultValueAttribute.cs
- ToolStripLocationCancelEventArgs.cs
- RtType.cs
- DoubleAnimationClockResource.cs
- DataServiceProviderWrapper.cs
- BaseHashHelper.cs
- LongValidator.cs
- PartitionerQueryOperator.cs
- Win32.cs
- QilXmlWriter.cs
- BindingList.cs
- SchemaType.cs
- ComponentGlyph.cs
- ObjectFullSpanRewriter.cs
- ISAPIWorkerRequest.cs
- Base64Stream.cs
- PassportPrincipal.cs
- InternalControlCollection.cs
- WebFaultClientMessageInspector.cs
- SystemIPv4InterfaceProperties.cs
- NativeRightsManagementAPIsStructures.cs
- TypeLibConverter.cs
- MulticastDelegate.cs
- SecurityKeyIdentifierClause.cs
- InkCanvasFeedbackAdorner.cs
- TypedTableBase.cs
- EntityClientCacheKey.cs
- followingsibling.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- DirectoryInfo.cs
- LicenseException.cs
- Span.cs
- Crc32Helper.cs
- HtmlTable.cs
- EventMappingSettingsCollection.cs
- XamlHostingSectionGroup.cs
- Image.cs
- TypeConverterHelper.cs
- Intellisense.cs
- SerializableAttribute.cs
- HwndSourceParameters.cs
- VerificationException.cs
- CookieHandler.cs
- ApplyHostConfigurationBehavior.cs
- WebBrowserHelper.cs
- ListViewItemMouseHoverEvent.cs
- PickBranchDesigner.xaml.cs
- TimeZoneNotFoundException.cs
- SurrogateChar.cs
- Operators.cs
- XmlDataCollection.cs
- TimeSpanMinutesConverter.cs
- PieceNameHelper.cs
- ThreadInterruptedException.cs
- DefinitionBase.cs
- InputReferenceExpression.cs
- Hashtable.cs