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
- ImageBrush.cs
- MatrixAnimationUsingPath.cs
- TypeListConverter.cs
- UncommonField.cs
- SizeIndependentAnimationStorage.cs
- DataGridPagerStyle.cs
- Token.cs
- XmlEntityReference.cs
- OutputCacheProfileCollection.cs
- DataExpression.cs
- DEREncoding.cs
- ContentValidator.cs
- HeaderCollection.cs
- LZCodec.cs
- TraceUtils.cs
- HttpClientChannel.cs
- AvTraceDetails.cs
- KerberosTicketHashIdentifierClause.cs
- JsonSerializer.cs
- TCEAdapterGenerator.cs
- SEHException.cs
- ViewGenResults.cs
- CodeSubDirectory.cs
- PEFileEvidenceFactory.cs
- EntityProviderServices.cs
- TcpServerChannel.cs
- __Filters.cs
- InputLanguageCollection.cs
- CompilerCollection.cs
- Margins.cs
- UnsafeNativeMethods.cs
- WebPartZone.cs
- QuaternionAnimationUsingKeyFrames.cs
- C14NUtil.cs
- MultiDataTrigger.cs
- Classification.cs
- CharacterBufferReference.cs
- Property.cs
- SelectorAutomationPeer.cs
- mda.cs
- BuiltInExpr.cs
- UpdateRecord.cs
- BlockingCollection.cs
- RegistryPermission.cs
- FormCollection.cs
- SafeLocalMemHandle.cs
- StreamAsIStream.cs
- Command.cs
- documentsequencetextcontainer.cs
- XPathSingletonIterator.cs
- basevalidator.cs
- VolatileEnlistmentMultiplexing.cs
- DeferredReference.cs
- LayoutEvent.cs
- Stackframe.cs
- SupportingTokenAuthenticatorSpecification.cs
- TemplateKeyConverter.cs
- CompiledQuery.cs
- FixedSchema.cs
- HtmlLiteralTextAdapter.cs
- SingleTagSectionHandler.cs
- HttpCachePolicy.cs
- COM2PictureConverter.cs
- ParserOptions.cs
- BitmapCodecInfo.cs
- ShaperBuffers.cs
- SqlDataAdapter.cs
- PiiTraceSource.cs
- DataSpaceManager.cs
- _BaseOverlappedAsyncResult.cs
- WrappedIUnknown.cs
- TextCompositionEventArgs.cs
- Paragraph.cs
- Code.cs
- ErrorFormatterPage.cs
- TempFiles.cs
- ResourceContainer.cs
- COM2ColorConverter.cs
- SortQueryOperator.cs
- MethodImplAttribute.cs
- SqlDataSourceStatusEventArgs.cs
- RuntimeConfigurationRecord.cs
- IsolatedStorage.cs
- MemberHolder.cs
- Timer.cs
- MappedMetaModel.cs
- KeyboardDevice.cs
- DataGridViewToolTip.cs
- ChannelPool.cs
- NetStream.cs
- HtmlElementErrorEventArgs.cs
- PerformanceCounterScope.cs
- DefaultSection.cs
- ExtensionFile.cs
- CqlLexerHelpers.cs
- PackWebRequest.cs
- ObjectQueryExecutionPlan.cs
- BlockCollection.cs
- UpdateTracker.cs
- EntityContainer.cs