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
- ApplicationFileCodeDomTreeGenerator.cs
- PrimitiveSchema.cs
- keycontainerpermission.cs
- ServiceDeploymentInfo.cs
- StoreContentChangedEventArgs.cs
- TextMessageEncodingElement.cs
- SyntaxCheck.cs
- MessageDecoder.cs
- DiagnosticTraceSource.cs
- XhtmlBasicValidationSummaryAdapter.cs
- RenderDataDrawingContext.cs
- Regex.cs
- InkPresenter.cs
- SqlTopReducer.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- Dictionary.cs
- RegexCharClass.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- WorkflowServiceBehavior.cs
- Main.cs
- PointCollectionConverter.cs
- RuleInfoComparer.cs
- DrawingAttributesDefaultValueFactory.cs
- CommentAction.cs
- XPathNavigator.cs
- TypeConverterHelper.cs
- IndicCharClassifier.cs
- TextClipboardData.cs
- DataGridViewComboBoxEditingControl.cs
- TextSelectionHelper.cs
- ObjectListTitleAttribute.cs
- ScriptHandlerFactory.cs
- TableColumn.cs
- RadialGradientBrush.cs
- RuleSettings.cs
- ComplexObject.cs
- PackagingUtilities.cs
- SqlNotificationEventArgs.cs
- FolderLevelBuildProviderAppliesToAttribute.cs
- Size.cs
- OdbcHandle.cs
- DataGridViewRowPostPaintEventArgs.cs
- CompilerTypeWithParams.cs
- webbrowsersite.cs
- KerberosSecurityTokenAuthenticator.cs
- Vector3DValueSerializer.cs
- ClientTargetSection.cs
- StretchValidation.cs
- FileEnumerator.cs
- DirtyTextRange.cs
- CodeActivityContext.cs
- RIPEMD160.cs
- SettingsAttributeDictionary.cs
- AttachedAnnotation.cs
- StickyNoteAnnotations.cs
- SQLDouble.cs
- ProxyHelper.cs
- VisualBasicImportReference.cs
- EventTrigger.cs
- SqlUserDefinedAggregateAttribute.cs
- MenuAutomationPeer.cs
- CachedResourceDictionaryExtension.cs
- Baml2006ReaderContext.cs
- DiagnosticEventProvider.cs
- EditorPartCollection.cs
- DeviceContext2.cs
- SessionStateSection.cs
- NavigationPropertyEmitter.cs
- InputEventArgs.cs
- AutoGeneratedField.cs
- MultiDataTrigger.cs
- MethodBody.cs
- GroupBoxRenderer.cs
- HtmlAnchor.cs
- SerializationFieldInfo.cs
- ColorContextHelper.cs
- CommandBindingCollection.cs
- ApplicationServiceHelper.cs
- IteratorFilter.cs
- TreeNode.cs
- ActivityDesignerHighlighter.cs
- KnowledgeBase.cs
- OdbcConnectionHandle.cs
- NetworkCredential.cs
- UpDownBase.cs
- HtmlTableCell.cs
- DynamicActionMessageFilter.cs
- SafeRightsManagementQueryHandle.cs
- ProcessThreadCollection.cs
- StorageComplexTypeMapping.cs
- CompiledIdentityConstraint.cs
- BitmapFrame.cs
- LZCodec.cs
- AssemblyNameProxy.cs
- HWStack.cs
- XmlDataProvider.cs
- TraceProvider.cs
- WmlListAdapter.cs
- PageVisual.cs
- MobileTemplatedControlDesigner.cs