Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / _emptywebproxy.cs / 1305376 / _emptywebproxy.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net { using System.Collections.Generic; [Serializable] internal sealed class EmptyWebProxy : IAutoWebProxy { [NonSerialized] private ICredentials m_credentials; public EmptyWebProxy() { } // // IWebProxy interface // public Uri GetProxy(Uri uri) { // this method won't get called by NetClasses because of the IsBypassed test below return uri; } public bool IsBypassed(Uri uri) { return true; // no proxy, always bypasses } public ICredentials Credentials { get { return m_credentials; } set { m_credentials = value; // doesn't do anything, but doesn't break contract either } } // // IAutoWebProxy interface // ProxyChain IAutoWebProxy.GetProxies(Uri destination) { return new DirectProxy(destination); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net { using System.Collections.Generic; [Serializable] internal sealed class EmptyWebProxy : IAutoWebProxy { [NonSerialized] private ICredentials m_credentials; public EmptyWebProxy() { } // // IWebProxy interface // public Uri GetProxy(Uri uri) { // this method won't get called by NetClasses because of the IsBypassed test below return uri; } public bool IsBypassed(Uri uri) { return true; // no proxy, always bypasses } public ICredentials Credentials { get { return m_credentials; } set { m_credentials = value; // doesn't do anything, but doesn't break contract either } } // // IAutoWebProxy interface // ProxyChain IAutoWebProxy.GetProxies(Uri destination) { return new DirectProxy(destination); } } } // 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
- SendMailErrorEventArgs.cs
- PageVisual.cs
- DesignBindingPropertyDescriptor.cs
- _SslSessionsCache.cs
- CurrencyWrapper.cs
- BrowserCapabilitiesCodeGenerator.cs
- HScrollProperties.cs
- InfoCardClaimCollection.cs
- AdornerPresentationContext.cs
- XPathNavigatorKeyComparer.cs
- HitTestParameters3D.cs
- XmlDocumentFieldSchema.cs
- PathBox.cs
- Light.cs
- Token.cs
- XsltOutput.cs
- VisualTreeHelper.cs
- CodeSubDirectoriesCollection.cs
- EventBuilder.cs
- WebHttpBehavior.cs
- XmlReflectionImporter.cs
- SafeNativeMethods.cs
- ResetableIterator.cs
- EntityProviderFactory.cs
- DataGridViewCellStyle.cs
- COM2FontConverter.cs
- UriParserTemplates.cs
- DataGridDetailsPresenterAutomationPeer.cs
- _Rfc2616CacheValidators.cs
- PathFigureCollection.cs
- DuplexChannelBinder.cs
- QueryPrefixOp.cs
- ExpressionWriter.cs
- HandleCollector.cs
- AssociatedControlConverter.cs
- ReferentialConstraint.cs
- HttpRuntimeSection.cs
- CommandDevice.cs
- ObjectView.cs
- ChangeDirector.cs
- ContentType.cs
- ObjectDisposedException.cs
- PasswordPropertyTextAttribute.cs
- EdmItemError.cs
- DefaultMemberAttribute.cs
- EntityCollection.cs
- ToolStripRenderer.cs
- TextFormatterContext.cs
- XmlTextReaderImplHelpers.cs
- Setter.cs
- StaticExtensionConverter.cs
- TextTreeDeleteContentUndoUnit.cs
- VariableAction.cs
- RoleManagerSection.cs
- GPRECT.cs
- Preprocessor.cs
- DynamicResourceExtension.cs
- EpmContentSerializer.cs
- SortedSet.cs
- DataGridViewRowCollection.cs
- IOThreadTimer.cs
- CompileXomlTask.cs
- AdvancedBindingEditor.cs
- PrintingPermission.cs
- sqlnorm.cs
- Error.cs
- SlotInfo.cs
- InheritablePropertyChangeInfo.cs
- GeometryCollection.cs
- ComboBoxRenderer.cs
- ObjectQueryProvider.cs
- ProfileProvider.cs
- ErrorHandler.cs
- NativeMethods.cs
- DesignerActionPanel.cs
- DrawListViewColumnHeaderEventArgs.cs
- ArithmeticException.cs
- TableItemProviderWrapper.cs
- DataRow.cs
- TagElement.cs
- ChildTable.cs
- SecurityHelper.cs
- XXXOnTypeBuilderInstantiation.cs
- TrackingRecordPreFilter.cs
- CopyAction.cs
- MetabaseServerConfig.cs
- NativeMethods.cs
- Pens.cs
- PointKeyFrameCollection.cs
- UpdateCompiler.cs
- SectionRecord.cs
- SwitchLevelAttribute.cs
- LazyLoadBehavior.cs
- ActiveXHelper.cs
- TypeGeneratedEventArgs.cs
- Span.cs
- ErrorHandler.cs
- ProofTokenCryptoHandle.cs
- JavaScriptSerializer.cs
- HtmlWindowCollection.cs