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
- MailHeaderInfo.cs
- FormViewDeleteEventArgs.cs
- ObjectManager.cs
- EventSinkHelperWriter.cs
- RuntimeIdentifierPropertyAttribute.cs
- HexParser.cs
- RestClientProxyHandler.cs
- PixelShader.cs
- WorkflowOwnerAsyncResult.cs
- NavigatingCancelEventArgs.cs
- AutomationPatternInfo.cs
- WorkflowMarkupElementEventArgs.cs
- CancellableEnumerable.cs
- InternalConfigRoot.cs
- WithStatement.cs
- Helpers.cs
- HttpModuleAction.cs
- SwitchAttribute.cs
- IsolatedStorageException.cs
- TextViewSelectionProcessor.cs
- ListViewItemSelectionChangedEvent.cs
- EnvelopedPkcs7.cs
- OdbcInfoMessageEvent.cs
- XPathAncestorIterator.cs
- WebPartConnectionsCancelEventArgs.cs
- ListControlActionList.cs
- ExceptionUtil.cs
- DbMetaDataFactory.cs
- SingleAnimationUsingKeyFrames.cs
- ChtmlCalendarAdapter.cs
- DataGridViewComboBoxColumn.cs
- SqlDelegatedTransaction.cs
- ValueType.cs
- Speller.cs
- XPathScanner.cs
- Tool.cs
- RIPEMD160.cs
- XmlObjectSerializerReadContextComplex.cs
- Internal.cs
- MouseGestureValueSerializer.cs
- DesigntimeLicenseContext.cs
- InvokePattern.cs
- MatrixAnimationUsingPath.cs
- InplaceBitmapMetadataWriter.cs
- PermissionToken.cs
- CreateUserWizardAutoFormat.cs
- ObjectDataSourceMethodEditor.cs
- EmbeddedMailObject.cs
- DataGridLengthConverter.cs
- BufferedWebEventProvider.cs
- MILUtilities.cs
- WsrmFault.cs
- ReadOnlyCollection.cs
- Crypto.cs
- CryptoApi.cs
- DataGridTableCollection.cs
- wgx_render.cs
- Stacktrace.cs
- Lock.cs
- CompModHelpers.cs
- VirtualizedCellInfoCollection.cs
- DataGridViewRowsAddedEventArgs.cs
- coordinatorscratchpad.cs
- SqlParameterizer.cs
- DBCSCodePageEncoding.cs
- DependencyObjectProvider.cs
- AssemblyCollection.cs
- QuaternionAnimation.cs
- ElementProxy.cs
- StateMachineAction.cs
- PointAnimationClockResource.cs
- SecurityContext.cs
- SQLMembershipProvider.cs
- OdbcEnvironment.cs
- TextEffect.cs
- Zone.cs
- CustomLineCap.cs
- CodeMethodMap.cs
- TextControlDesigner.cs
- TextEditorTyping.cs
- Graph.cs
- SqlProcedureAttribute.cs
- Context.cs
- ValidatedMobileControlConverter.cs
- Util.cs
- MdbDataFileEditor.cs
- Privilege.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- SessionIDManager.cs
- BindingElementCollection.cs
- RuntimeWrappedException.cs
- TargetInvocationException.cs
- OdbcReferenceCollection.cs
- XmlDocument.cs
- QueryStringParameter.cs
- RefExpr.cs
- CommandLibraryHelper.cs
- CustomLineCap.cs
- SocketAddress.cs
- compensatingcollection.cs