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
- StringReader.cs
- AttachedPropertyMethodSelector.cs
- PropertyInformation.cs
- Style.cs
- SQLSingle.cs
- _WebProxyDataBuilder.cs
- PersonalizationState.cs
- MgmtResManager.cs
- DataMember.cs
- SmtpCommands.cs
- AsyncPostBackErrorEventArgs.cs
- LogWriteRestartAreaState.cs
- TraceUtility.cs
- XamlValidatingReader.cs
- Line.cs
- ExeConfigurationFileMap.cs
- DataGridViewComboBoxEditingControl.cs
- Clause.cs
- CodeCommentStatement.cs
- cookiecollection.cs
- UserUseLicenseDictionaryLoader.cs
- BidOverLoads.cs
- CollectionExtensions.cs
- LinqDataSourceSelectEventArgs.cs
- wgx_sdk_version.cs
- TraceEventCache.cs
- CodeSnippetStatement.cs
- HtmlTernaryTree.cs
- XD.cs
- PrimitiveSchema.cs
- StrongNameIdentityPermission.cs
- PageAsyncTask.cs
- TagMapInfo.cs
- SupportsEventValidationAttribute.cs
- LinkedResource.cs
- IdlingCommunicationPool.cs
- UserValidatedEventArgs.cs
- SoapElementAttribute.cs
- ExpressionPrefixAttribute.cs
- TraceXPathNavigator.cs
- StructuredTypeEmitter.cs
- Link.cs
- GridEntryCollection.cs
- KeySplineConverter.cs
- TrustManagerMoreInformation.cs
- CollectionEditVerbManager.cs
- Cloud.cs
- BitmapEffectGroup.cs
- StaticExtension.cs
- MatrixAnimationUsingKeyFrames.cs
- ActiveDocumentEvent.cs
- ReferenceEqualityComparer.cs
- SemanticBasicElement.cs
- QueueProcessor.cs
- WindowsToolbar.cs
- MediaScriptCommandRoutedEventArgs.cs
- NewArrayExpression.cs
- HostingEnvironmentSection.cs
- AutoCompleteStringCollection.cs
- StorageModelBuildProvider.cs
- JsonCollectionDataContract.cs
- SecurityListenerSettingsLifetimeManager.cs
- ViewSimplifier.cs
- HuffModule.cs
- BitFlagsGenerator.cs
- TabControl.cs
- AccessibleObject.cs
- HttpListener.cs
- CommaDelimitedStringAttributeCollectionConverter.cs
- MatrixAnimationBase.cs
- MembershipValidatePasswordEventArgs.cs
- PartialToken.cs
- HitTestWithGeometryDrawingContextWalker.cs
- ShaderEffect.cs
- MultiPropertyDescriptorGridEntry.cs
- MinMaxParagraphWidth.cs
- ConnectionPoolManager.cs
- DataGridViewDesigner.cs
- SmiGettersStream.cs
- LongCountAggregationOperator.cs
- DbProviderSpecificTypePropertyAttribute.cs
- SmtpCommands.cs
- PowerModeChangedEventArgs.cs
- SecurityDocument.cs
- FormattedText.cs
- OdbcConnectionHandle.cs
- WebPartDisplayModeCollection.cs
- Content.cs
- ThreadPool.cs
- DrawingBrush.cs
- ParseElement.cs
- SiteMapProvider.cs
- BindToObject.cs
- ExpressionWriter.cs
- DataGridItemEventArgs.cs
- LinkedList.cs
- SqlDataSource.cs
- _CacheStreams.cs
- AddInPipelineAttributes.cs
- CodeRegionDirective.cs