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
- mactripleDES.cs
- UInt64Storage.cs
- QueryActivatableWorkflowsCommand.cs
- TextBoxAutoCompleteSourceConverter.cs
- DataChangedEventManager.cs
- ImageAttributes.cs
- FlowDocumentScrollViewer.cs
- RequestBringIntoViewEventArgs.cs
- ErrorProvider.cs
- OdbcErrorCollection.cs
- WebPartCollection.cs
- CqlLexer.cs
- SqlCacheDependencyDatabase.cs
- DataListItemEventArgs.cs
- DateTimeFormat.cs
- ThreadStartException.cs
- StateWorkerRequest.cs
- ButtonBase.cs
- StateMachine.cs
- propertytag.cs
- StylusOverProperty.cs
- CultureTable.cs
- DispatcherObject.cs
- WebPartRestoreVerb.cs
- CircleHotSpot.cs
- WindowsGraphicsCacheManager.cs
- XmlSequenceWriter.cs
- RelationshipEnd.cs
- RequestStatusBarUpdateEventArgs.cs
- StatusBarItemAutomationPeer.cs
- AssociationProvider.cs
- ToolStripMenuItemCodeDomSerializer.cs
- WhiteSpaceTrimStringConverter.cs
- Array.cs
- MapPathBasedVirtualPathProvider.cs
- CodeGenHelper.cs
- Compiler.cs
- WindowShowOrOpenTracker.cs
- BindingCollection.cs
- ProcessModelInfo.cs
- NumericUpDown.cs
- FontCollection.cs
- OrderingExpression.cs
- XmlSchemaSimpleContentRestriction.cs
- DefaultAssemblyResolver.cs
- SupportingTokenBindingElement.cs
- ZoomPercentageConverter.cs
- ProcessModule.cs
- ReferencedAssembly.cs
- TypeDescriptor.cs
- typedescriptorpermissionattribute.cs
- BackgroundWorker.cs
- NullRuntimeConfig.cs
- SourceChangedEventArgs.cs
- Base64Decoder.cs
- TaskbarItemInfo.cs
- Stylesheet.cs
- PrePostDescendentsWalker.cs
- XmlResolver.cs
- KeyTime.cs
- TabControl.cs
- TextFormatterImp.cs
- SmtpFailedRecipientsException.cs
- Error.cs
- Rule.cs
- CompositeDataBoundControl.cs
- BaseParser.cs
- VoiceObjectToken.cs
- Highlights.cs
- PEFileEvidenceFactory.cs
- SHA512CryptoServiceProvider.cs
- XmlnsPrefixAttribute.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- OracleBinary.cs
- UITypeEditor.cs
- DataGridPagingPage.cs
- EntityProxyFactory.cs
- MsmqActivation.cs
- Marshal.cs
- StateManagedCollection.cs
- Propagator.Evaluator.cs
- EditorPart.cs
- TransactionTable.cs
- CallSiteBinder.cs
- ReadOnlyDataSource.cs
- BaseDataList.cs
- StringConcat.cs
- InvokeMemberBinder.cs
- RtfToXamlLexer.cs
- TimeSpanConverter.cs
- HwndMouseInputProvider.cs
- Region.cs
- PasswordPropertyTextAttribute.cs
- UpdateException.cs
- ExclusiveNamedPipeTransportManager.cs
- EdmSchemaAttribute.cs
- DrawingImage.cs
- AttributeProviderAttribute.cs
- BamlWriter.cs
- SharedPersonalizationStateInfo.cs