Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / BaseWebProxyFinder.cs / 1305376 / BaseWebProxyFinder.cs
using System; using System.Collections.Generic; namespace System.Net { // The purpose of all derived classes of WebProxyFinder is to determine the PAC file location, // download and compile the file and then execute it to retrieve the list of proxies for a certain // Uri. internal abstract class BaseWebProxyFinder : IWebProxyFinder { private AutoWebProxyState state; private AutoWebProxyScriptEngine engine; public BaseWebProxyFinder(AutoWebProxyScriptEngine engine) { this.engine = engine; } public bool IsValid { get { return (state == AutoWebProxyState.Completed) || (state == AutoWebProxyState.Uninitialized); } } public bool IsUnrecognizedScheme { get { return state == AutoWebProxyState.UnrecognizedScheme; } } public abstract bool GetProxies(Uri destination, out IListproxyList); public abstract void Abort(); public void Reset() { State = AutoWebProxyState.Uninitialized; } public void Dispose() { Dispose(true); } protected AutoWebProxyState State { get { return state; } set { state = value; } } protected AutoWebProxyScriptEngine Engine { get { return engine; } } protected abstract void Dispose(bool disposing); protected enum AutoWebProxyState { Uninitialized, DiscoveryFailure, DownloadFailure, CompilationFailure, UnrecognizedScheme, Completed } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.Collections.Generic; namespace System.Net { // The purpose of all derived classes of WebProxyFinder is to determine the PAC file location, // download and compile the file and then execute it to retrieve the list of proxies for a certain // Uri. internal abstract class BaseWebProxyFinder : IWebProxyFinder { private AutoWebProxyState state; private AutoWebProxyScriptEngine engine; public BaseWebProxyFinder(AutoWebProxyScriptEngine engine) { this.engine = engine; } public bool IsValid { get { return (state == AutoWebProxyState.Completed) || (state == AutoWebProxyState.Uninitialized); } } public bool IsUnrecognizedScheme { get { return state == AutoWebProxyState.UnrecognizedScheme; } } public abstract bool GetProxies(Uri destination, out IList proxyList); public abstract void Abort(); public void Reset() { State = AutoWebProxyState.Uninitialized; } public void Dispose() { Dispose(true); } protected AutoWebProxyState State { get { return state; } set { state = value; } } protected AutoWebProxyScriptEngine Engine { get { return engine; } } protected abstract void Dispose(bool disposing); protected enum AutoWebProxyState { Uninitialized, DiscoveryFailure, DownloadFailure, CompilationFailure, UnrecognizedScheme, Completed } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WebBaseEventKeyComparer.cs
- DockPattern.cs
- Msec.cs
- PerformanceCounterLib.cs
- DataGridViewHitTestInfo.cs
- SpellerStatusTable.cs
- BufferModeSettings.cs
- TypeConverterAttribute.cs
- DBParameter.cs
- BinHexEncoding.cs
- Keyboard.cs
- BaseServiceProvider.cs
- EmptyEnumerator.cs
- PageThemeParser.cs
- _RequestCacheProtocol.cs
- ElementAction.cs
- ProtocolElementCollection.cs
- ApplicationTrust.cs
- StrokeNodeOperations2.cs
- DeviceSpecificChoice.cs
- ExternalException.cs
- XComponentModel.cs
- EmptyControlCollection.cs
- MobileControlsSection.cs
- XamlStream.cs
- CompositeFontParser.cs
- Schema.cs
- Behavior.cs
- thaishape.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- WindowsScrollBarBits.cs
- MeasureData.cs
- PositiveTimeSpanValidatorAttribute.cs
- MeasurementDCInfo.cs
- XmlNamedNodeMap.cs
- XmlArrayAttribute.cs
- BitmapCodecInfoInternal.cs
- WindowsRichEdit.cs
- FlowLayoutSettings.cs
- RegisteredScript.cs
- SQLCharsStorage.cs
- Marshal.cs
- PinnedBufferMemoryStream.cs
- EntityStoreSchemaGenerator.cs
- ApplicationManager.cs
- PolicyVersion.cs
- AtomPub10CategoriesDocumentFormatter.cs
- WinEventQueueItem.cs
- CurrentChangingEventArgs.cs
- DiscoveryClientRequestChannel.cs
- Keyboard.cs
- ProcessInfo.cs
- StylusShape.cs
- SocketAddress.cs
- WorkflowServiceAttributesTypeConverter.cs
- XmlIncludeAttribute.cs
- ICspAsymmetricAlgorithm.cs
- TextEffectResolver.cs
- Privilege.cs
- StaticResourceExtension.cs
- FtpRequestCacheValidator.cs
- Rotation3DAnimation.cs
- MdImport.cs
- DataGridViewCellStyleChangedEventArgs.cs
- NetworkCredential.cs
- DocumentReference.cs
- RunWorkerCompletedEventArgs.cs
- SafeThreadHandle.cs
- XmlQueryCardinality.cs
- CellCreator.cs
- ArrayConverter.cs
- RuleSettings.cs
- DrawListViewSubItemEventArgs.cs
- Debugger.cs
- SQLConvert.cs
- WorkerRequest.cs
- Expressions.cs
- XmlDownloadManager.cs
- FixedTextView.cs
- MatrixAnimationUsingPath.cs
- DispatcherSynchronizationContext.cs
- ScriptingJsonSerializationSection.cs
- WebDescriptionAttribute.cs
- DesignerOptionService.cs
- UnmanagedMemoryStreamWrapper.cs
- LinkDescriptor.cs
- SessionParameter.cs
- MembershipPasswordException.cs
- invalidudtexception.cs
- CSharpCodeProvider.cs
- SapiRecoContext.cs
- FtpCachePolicyElement.cs
- ListViewTableRow.cs
- MemoryPressure.cs
- PermissionSetTriple.cs
- BrowserInteropHelper.cs
- Point3DCollectionValueSerializer.cs
- ControlEvent.cs
- DependencyPropertyDescriptor.cs
- AdornerDecorator.cs