Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- TabItemWrapperAutomationPeer.cs
- NamedServiceModelExtensionCollectionElement.cs
- EndpointConfigContainer.cs
- Int32CAMarshaler.cs
- SettingsPropertyIsReadOnlyException.cs
- TypeElementCollection.cs
- XmlTextReaderImpl.cs
- Brushes.cs
- Int32KeyFrameCollection.cs
- HyperLinkField.cs
- BindingEntityInfo.cs
- UnmanagedMemoryStream.cs
- SmiConnection.cs
- DateTimeStorage.cs
- DataGridViewMethods.cs
- AdornerPresentationContext.cs
- XhtmlBasicTextBoxAdapter.cs
- FilterableAttribute.cs
- EncryptedPackageFilter.cs
- Activator.cs
- IPHostEntry.cs
- DataObjectCopyingEventArgs.cs
- ScopelessEnumAttribute.cs
- XmlWriterSettings.cs
- SelectedGridItemChangedEvent.cs
- SelectionChangedEventArgs.cs
- ImageDrawing.cs
- RegexCompiler.cs
- FontStyleConverter.cs
- LockCookie.cs
- UIElement3DAutomationPeer.cs
- ScrollProviderWrapper.cs
- GeneralTransformGroup.cs
- LayoutEngine.cs
- XmlRawWriterWrapper.cs
- ForwardPositionQuery.cs
- StructuredProperty.cs
- PropertyIDSet.cs
- ContextProperty.cs
- Int32CAMarshaler.cs
- XomlDesignerLoader.cs
- TabPanel.cs
- ExtensionElement.cs
- arabicshape.cs
- KoreanCalendar.cs
- PositiveTimeSpanValidatorAttribute.cs
- EventLogEntry.cs
- SQLSingle.cs
- WindowsFormsDesignerOptionService.cs
- Site.cs
- CodeDelegateCreateExpression.cs
- ToolStripStatusLabel.cs
- WebPartEventArgs.cs
- ProfileBuildProvider.cs
- DataObjectEventArgs.cs
- SimplePropertyEntry.cs
- RepeaterItemCollection.cs
- BuildResult.cs
- validation.cs
- ScrollEventArgs.cs
- DeobfuscatingStream.cs
- SafeHandle.cs
- ActivityDesigner.cs
- BoundColumn.cs
- DelimitedListTraceListener.cs
- WaveHeader.cs
- ManagementObject.cs
- OdbcConnectionOpen.cs
- GradientStopCollection.cs
- TimeSpanParse.cs
- ReferenceEqualityComparer.cs
- EntityStoreSchemaGenerator.cs
- JoinElimination.cs
- TextStore.cs
- ObjectQueryProvider.cs
- StyleConverter.cs
- PageAdapter.cs
- HighlightComponent.cs
- TextBoxLine.cs
- DependencyStoreSurrogate.cs
- IISMapPath.cs
- CodeIndexerExpression.cs
- ChangeBlockUndoRecord.cs
- XPathEmptyIterator.cs
- GreenMethods.cs
- LinearKeyFrames.cs
- RelationshipConstraintValidator.cs
- CommandHelper.cs
- XmlDataSourceView.cs
- PersonalizationProviderHelper.cs
- Nodes.cs
- DataGridRowClipboardEventArgs.cs
- WmlMobileTextWriter.cs
- ObjectStorage.cs
- SessionEndedEventArgs.cs
- DataBindingHandlerAttribute.cs
- BuildManager.cs
- FontConverter.cs
- NetCodeGroup.cs