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
- NameValuePermission.cs
- Image.cs
- DataBoundControlParameterTarget.cs
- GcSettings.cs
- EmptyCollection.cs
- ProcessThread.cs
- TextureBrush.cs
- StatusBarItemAutomationPeer.cs
- UICuesEvent.cs
- XmlReaderDelegator.cs
- NativeMethods.cs
- Misc.cs
- UnsafeNativeMethods.cs
- XmlTextReaderImplHelpers.cs
- SessionPageStateSection.cs
- Pts.cs
- Menu.cs
- MessageCredentialType.cs
- DataGridViewUtilities.cs
- MessagePropertyFilter.cs
- RoleServiceManager.cs
- PropertyKey.cs
- ListManagerBindingsCollection.cs
- UndoEngine.cs
- ProfileGroupSettingsCollection.cs
- MaterialGroup.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- EffectiveValueEntry.cs
- SchemaDeclBase.cs
- URLMembershipCondition.cs
- Pair.cs
- Part.cs
- OrderByQueryOptionExpression.cs
- QueryCursorEventArgs.cs
- ManagedCodeMarkers.cs
- TextTreeFixupNode.cs
- BitmapScalingModeValidation.cs
- ConfigurationLocationCollection.cs
- OdbcUtils.cs
- TabControlCancelEvent.cs
- SendingRequestEventArgs.cs
- RewritingValidator.cs
- QueryStringParameter.cs
- EntityDesignerBuildProvider.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- DrawingState.cs
- _BufferOffsetSize.cs
- CodeTypeConstructor.cs
- MessageVersionConverter.cs
- RuntimeCompatibilityAttribute.cs
- SettingsSavedEventArgs.cs
- XmlComplianceUtil.cs
- RemoteX509Token.cs
- SettingsProviderCollection.cs
- WebPartZone.cs
- JsonReader.cs
- InvalidProgramException.cs
- ResponseBodyWriter.cs
- FixedPageProcessor.cs
- HandlerFactoryWrapper.cs
- SecurityKeyIdentifierClause.cs
- InputLanguage.cs
- SHA384Managed.cs
- HttpPostedFile.cs
- PageContentCollection.cs
- ListBoxItemWrapperAutomationPeer.cs
- BinaryMessageFormatter.cs
- StringUtil.cs
- MemoryPressure.cs
- ObjectQueryProvider.cs
- ConfigurationPropertyAttribute.cs
- WinInetCache.cs
- EmptyQuery.cs
- MemberRelationshipService.cs
- TemplateXamlParser.cs
- ControlBindingsCollection.cs
- LoadedOrUnloadedOperation.cs
- AccessDataSource.cs
- DbQueryCommandTree.cs
- XmlException.cs
- EqualityComparer.cs
- HtmlHistory.cs
- UserControlBuildProvider.cs
- ChtmlSelectionListAdapter.cs
- Grid.cs
- BodyGlyph.cs
- controlskin.cs
- WebPartCatalogAddVerb.cs
- FileStream.cs
- GPRECTF.cs
- BoolExpression.cs
- ResourceCategoryAttribute.cs
- propertyentry.cs
- DocumentXmlWriter.cs
- ThreadSafeList.cs
- WpfKnownTypeInvoker.cs
- EllipticalNodeOperations.cs
- MetadataArtifactLoaderFile.cs
- XmlILModule.cs
- FixedTextPointer.cs