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
- ClientSponsor.cs
- SystemWebCachingSectionGroup.cs
- KeyNotFoundException.cs
- ScopeCompiler.cs
- AssemblyFilter.cs
- DataGrid.cs
- Win32Exception.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- BitVec.cs
- DesignerRegionCollection.cs
- RuntimeHelpers.cs
- DataGridViewCellStyle.cs
- ProfessionalColorTable.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- CustomActivityDesigner.cs
- Point3DAnimationBase.cs
- __ConsoleStream.cs
- KeyGestureValueSerializer.cs
- EncodingTable.cs
- RegexTree.cs
- Latin1Encoding.cs
- BooleanProjectedSlot.cs
- ConfigurationManager.cs
- HostExecutionContextManager.cs
- MSHTMLHost.cs
- TextTreeRootNode.cs
- XmlImplementation.cs
- AsymmetricCryptoHandle.cs
- brushes.cs
- DefaultPropertyAttribute.cs
- MetadataArtifactLoaderComposite.cs
- ObjectStateEntryDbDataRecord.cs
- ToolStripSeparator.cs
- ObjectManager.cs
- Size3DConverter.cs
- CancelRequestedQuery.cs
- SpecialTypeDataContract.cs
- ErrorStyle.cs
- SystemIcons.cs
- SurrogateDataContract.cs
- DataAdapter.cs
- TextElementEditingBehaviorAttribute.cs
- String.cs
- Pair.cs
- NativeMethods.cs
- AtomContentProperty.cs
- StaticExtension.cs
- AttributeCollection.cs
- MappedMetaModel.cs
- WebPartTransformerAttribute.cs
- CodeTypeDelegate.cs
- WebCategoryAttribute.cs
- ConfigsHelper.cs
- Stylesheet.cs
- DataControlCommands.cs
- PerformanceCountersElement.cs
- GifBitmapEncoder.cs
- MenuItemBinding.cs
- TextElementEditingBehaviorAttribute.cs
- Oid.cs
- RootBrowserWindow.cs
- AssignDesigner.xaml.cs
- ResourcePermissionBase.cs
- SimpleParser.cs
- FamilyTypeface.cs
- AssertFilter.cs
- FontUnit.cs
- Enlistment.cs
- InstanceDataCollection.cs
- WebPartConnectVerb.cs
- BufferModesCollection.cs
- ReflectionPermission.cs
- XmlnsPrefixAttribute.cs
- BamlCollectionHolder.cs
- PointAnimationClockResource.cs
- CompositionTarget.cs
- SecurityContextSecurityTokenAuthenticator.cs
- DataGridViewRowsRemovedEventArgs.cs
- TextSegment.cs
- Selector.cs
- WebPartEditorApplyVerb.cs
- StringOutput.cs
- CodeCastExpression.cs
- BitmapEffectCollection.cs
- StorageAssociationTypeMapping.cs
- TypedAsyncResult.cs
- ManagedWndProcTracker.cs
- EventLogEntryCollection.cs
- DataKey.cs
- DataGridLinkButton.cs
- Separator.cs
- RequestCacheManager.cs
- CodeIterationStatement.cs
- AutomationElementCollection.cs
- BrowserTree.cs
- ProfilePropertySettings.cs
- DataReceivedEventArgs.cs
- StringConcat.cs
- WindowsAuthenticationModule.cs
- WebServiceData.cs