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
- SuppressIldasmAttribute.cs
- TableLayoutSettings.cs
- IgnoreDeviceFilterElementCollection.cs
- HtmlInputHidden.cs
- DataTableClearEvent.cs
- PackageDigitalSignatureManager.cs
- UnsafeCollabNativeMethods.cs
- Panel.cs
- HtmlProps.cs
- ListSourceHelper.cs
- MatrixStack.cs
- DataGridViewColumn.cs
- RawContentTypeMapper.cs
- DataGridLinkButton.cs
- WsdlInspector.cs
- MatcherBuilder.cs
- CaseStatement.cs
- RuleSettings.cs
- ObjectItemAttributeAssemblyLoader.cs
- GridPatternIdentifiers.cs
- CharacterShapingProperties.cs
- RecognizeCompletedEventArgs.cs
- HostingEnvironment.cs
- TCPClient.cs
- _NegoState.cs
- DocumentPageHost.cs
- TreeBuilderBamlTranslator.cs
- HtmlInputText.cs
- KeyNotFoundException.cs
- AspCompat.cs
- ControlCollection.cs
- Label.cs
- CultureSpecificStringDictionary.cs
- BinaryObjectInfo.cs
- JavaScriptString.cs
- XmlArrayItemAttributes.cs
- BaseEntityWrapper.cs
- EasingKeyFrames.cs
- AsymmetricAlgorithm.cs
- GridEntryCollection.cs
- ResizeGrip.cs
- DoubleStorage.cs
- SelectionService.cs
- CreateUserErrorEventArgs.cs
- TextCharacters.cs
- ResXResourceReader.cs
- SafeProcessHandle.cs
- Pen.cs
- _Win32.cs
- CursorConverter.cs
- XmlName.cs
- TimeoutTimer.cs
- ContentHostHelper.cs
- loginstatus.cs
- ConfigViewGenerator.cs
- GridItemProviderWrapper.cs
- CustomError.cs
- ConnectionStringsExpressionBuilder.cs
- XNameTypeConverter.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- InputScopeManager.cs
- CodeParameterDeclarationExpression.cs
- ExpressionBinding.cs
- safex509handles.cs
- Vertex.cs
- FamilyTypefaceCollection.cs
- ManagementPath.cs
- ParameterBuilder.cs
- XmlArrayItemAttributes.cs
- QuaternionValueSerializer.cs
- RouteTable.cs
- CTreeGenerator.cs
- EastAsianLunisolarCalendar.cs
- DataGridViewCellStyleEditor.cs
- MailAddress.cs
- EventLogLink.cs
- BindingCompleteEventArgs.cs
- GetPageNumberCompletedEventArgs.cs
- ArgIterator.cs
- HtmlHead.cs
- XsltFunctions.cs
- DataBoundControl.cs
- BindingUtils.cs
- FakeModelPropertyImpl.cs
- DataKeyArray.cs
- DecimalAnimationUsingKeyFrames.cs
- CompositeDataBoundControl.cs
- SendActivityValidator.cs
- printdlgexmarshaler.cs
- CounterSample.cs
- DataGridDetailsPresenterAutomationPeer.cs
- Journaling.cs
- XmlSchemaCollection.cs
- Connector.cs
- Pen.cs
- IResourceProvider.cs
- _NativeSSPI.cs
- UdpUtility.cs
- SiteMembershipCondition.cs
- AttachedAnnotation.cs