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
- Propagator.JoinPropagator.SubstitutingCloneVisitor.cs
- dsa.cs
- SchemaElementLookUpTableEnumerator.cs
- StateFinalizationActivity.cs
- TemplatePagerField.cs
- updatecommandorderer.cs
- PrintingPermission.cs
- DesignerActionUI.cs
- HelpEvent.cs
- AutomationPatternInfo.cs
- EventWaitHandle.cs
- GradientBrush.cs
- GroupItemAutomationPeer.cs
- RelatedImageListAttribute.cs
- TimeSpanValidator.cs
- Pen.cs
- UserControlBuildProvider.cs
- EventTrigger.cs
- XmlLangPropertyAttribute.cs
- PasswordRecovery.cs
- XmlNode.cs
- datacache.cs
- EncryptedKeyIdentifierClause.cs
- WebRequestModuleElement.cs
- SecurityElement.cs
- ResolvedKeyFrameEntry.cs
- ButtonBaseAdapter.cs
- QilPatternFactory.cs
- CompiledQueryCacheKey.cs
- SystemException.cs
- PeerCollaboration.cs
- WebZone.cs
- MetadataImporter.cs
- BordersPage.cs
- EntityEntry.cs
- ContentPlaceHolder.cs
- PackUriHelper.cs
- BamlBinaryReader.cs
- TypeForwardedFromAttribute.cs
- ModelTreeEnumerator.cs
- XPathLexer.cs
- DataGridColumnEventArgs.cs
- NeutralResourcesLanguageAttribute.cs
- GuidTagList.cs
- securitycriticaldata.cs
- MailFileEditor.cs
- Slider.cs
- HttpPostProtocolImporter.cs
- AssertFilter.cs
- PageCatalogPart.cs
- ToolStripDropDownItem.cs
- Composition.cs
- PersistChildrenAttribute.cs
- TimeSpanSecondsConverter.cs
- CodeMemberProperty.cs
- QilGenerator.cs
- FontStretchConverter.cs
- FastEncoder.cs
- FuncTypeConverter.cs
- RectAnimationClockResource.cs
- DrawItemEvent.cs
- _ListenerAsyncResult.cs
- XhtmlConformanceSection.cs
- WindowsUserNameCachingSecurityTokenAuthenticator.cs
- X509ImageLogo.cs
- StateMachineAction.cs
- FormView.cs
- NativeMethods.cs
- HMACSHA512.cs
- AsyncResult.cs
- ManagedWndProcTracker.cs
- SuppressIldasmAttribute.cs
- FileDataSourceCache.cs
- ServiceNotStartedException.cs
- ParameterBuilder.cs
- VisualBrush.cs
- NullableBoolConverter.cs
- InvalidOperationException.cs
- MobilePage.cs
- FormatException.cs
- OneOfElement.cs
- AccessibilityApplicationManager.cs
- ToolStripCodeDomSerializer.cs
- IMembershipProvider.cs
- APCustomTypeDescriptor.cs
- BaseDataListActionList.cs
- DataGridViewComboBoxColumn.cs
- GenericsNotImplementedException.cs
- WorkerRequest.cs
- TdsParserSafeHandles.cs
- DocumentPageView.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- CFStream.cs
- OracleColumn.cs
- SymbolPair.cs
- ListViewGroupItemCollection.cs
- SamlAdvice.cs
- HtmlInputReset.cs
- VSWCFServiceContractGenerator.cs
- DummyDataSource.cs