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
- RuntimeHelpers.cs
- ReachPageContentSerializerAsync.cs
- AttributeEmitter.cs
- TextBoxAutoCompleteSourceConverter.cs
- TableCellCollection.cs
- DockPanel.cs
- AtomServiceDocumentSerializer.cs
- SelectorAutomationPeer.cs
- Documentation.cs
- ManagementInstaller.cs
- ParallelQuery.cs
- ScriptIgnoreAttribute.cs
- TextRangeEditTables.cs
- HTMLTextWriter.cs
- TreeNodeSelectionProcessor.cs
- InProcStateClientManager.cs
- SurrogateDataContract.cs
- ExpressionPrinter.cs
- WebPartCatalogCloseVerb.cs
- Button.cs
- ColorAnimationUsingKeyFrames.cs
- XmlSchemaSimpleContentExtension.cs
- Attributes.cs
- Utils.cs
- DefaultValueTypeConverter.cs
- Lease.cs
- Drawing.cs
- PersonalizableTypeEntry.cs
- IsolationInterop.cs
- HtmlHistory.cs
- KeyedQueue.cs
- RotateTransform3D.cs
- ServiceObjectContainer.cs
- ActivityXRefConverter.cs
- FamilyTypefaceCollection.cs
- DataGridTextBox.cs
- ScriptManagerProxy.cs
- DeviceContext.cs
- StrokeDescriptor.cs
- Compensate.cs
- XhtmlBasicLinkAdapter.cs
- GlobalItem.cs
- MatrixCamera.cs
- RoutedUICommand.cs
- sqlcontext.cs
- PrimitiveDataContract.cs
- DataBindingCollectionEditor.cs
- SingleKeyFrameCollection.cs
- ByteConverter.cs
- KoreanCalendar.cs
- HttpApplication.cs
- GenericUriParser.cs
- DataSourceHelper.cs
- UnSafeCharBuffer.cs
- CodeStatementCollection.cs
- WindowsClientCredential.cs
- LightweightCodeGenerator.cs
- LayoutInformation.cs
- MenuItemAutomationPeer.cs
- ProfileSettingsCollection.cs
- SqlExpressionNullability.cs
- Geometry3D.cs
- DuplexSecurityProtocolFactory.cs
- DrawingBrush.cs
- StringCollectionMarkupSerializer.cs
- PropertyPathWorker.cs
- Rijndael.cs
- WebZone.cs
- Metadata.cs
- IdnElement.cs
- ISO2022Encoding.cs
- HttpInputStream.cs
- ViewStateChangedEventArgs.cs
- FtpCachePolicyElement.cs
- ScriptResourceHandler.cs
- SoapAttributeOverrides.cs
- Hyperlink.cs
- StreamWithDictionary.cs
- RuleSettingsCollection.cs
- Transform3DGroup.cs
- RenderData.cs
- RecognizedWordUnit.cs
- BitStack.cs
- FunctionQuery.cs
- PointHitTestResult.cs
- ObjectAnimationUsingKeyFrames.cs
- DebugView.cs
- sortedlist.cs
- TimeoutTimer.cs
- CompilationSection.cs
- ColumnResizeUndoUnit.cs
- KnownTypes.cs
- GestureRecognizer.cs
- CompiledAction.cs
- AttachInfo.cs
- SrgsItemList.cs
- Gdiplus.cs
- FragmentQueryProcessor.cs
- CultureData.cs
- DataComponentNameHandler.cs