Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Net / System / Net / Configuration / ProxyElement.cs / 1 / ProxyElement.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net.Configuration { using System; using System.Xml; using System.Configuration; using System.Reflection; using System.ComponentModel; using System.Security.Permissions; public sealed class ProxyElement : ConfigurationElement { public enum BypassOnLocalValues { Unspecified = -1, False = 0, True = 1, } public enum UseSystemDefaultValues { Unspecified = -1, False = 0, True = 1, } public enum AutoDetectValues { Unspecified = -1, False = 0, True = 1, } public ProxyElement() { this.properties.Add(this.autoDetect); this.properties.Add(this.scriptLocation); this.properties.Add(this.bypassonlocal); this.properties.Add(this.proxyaddress); this.properties.Add(this.usesystemdefault); } protected override ConfigurationPropertyCollection Properties { get { return this.properties; } } [ConfigurationProperty(ConfigurationStrings.AutoDetect, DefaultValue=AutoDetectValues.Unspecified)] public AutoDetectValues AutoDetect { get { return (AutoDetectValues)this[this.autoDetect]; } set { this[this.autoDetect] = value; } } [ConfigurationProperty(ConfigurationStrings.ScriptLocation)] public Uri ScriptLocation { get { return (Uri)this[this.scriptLocation]; } set { this[this.scriptLocation] = value; } } [ConfigurationProperty(ConfigurationStrings.BypassOnLocal, DefaultValue=(BypassOnLocalValues) BypassOnLocalValues.Unspecified)] public BypassOnLocalValues BypassOnLocal { get { return (BypassOnLocalValues) this[this.bypassonlocal]; } set { this[this.bypassonlocal] = value; } } [ConfigurationProperty(ConfigurationStrings.ProxyAddress)] public Uri ProxyAddress { get { return (Uri) this[this.proxyaddress]; } set { this[this.proxyaddress] = value; } } [ConfigurationProperty(ConfigurationStrings.UseSystemDefault, DefaultValue=(UseSystemDefaultValues) UseSystemDefaultValues.Unspecified)] public UseSystemDefaultValues UseSystemDefault { get { return (UseSystemDefaultValues)this[this.usesystemdefault]; } set { this[this.usesystemdefault] = value; } } ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection(); readonly ConfigurationProperty autoDetect = new ConfigurationProperty(ConfigurationStrings.AutoDetect, typeof(AutoDetectValues), AutoDetectValues.Unspecified, new EnumConverter(typeof(AutoDetectValues)), null, ConfigurationPropertyOptions.None); readonly ConfigurationProperty scriptLocation = new ConfigurationProperty(ConfigurationStrings.ScriptLocation, typeof(Uri), null, new UriTypeConverter(UriKind.Absolute), null, ConfigurationPropertyOptions.None); // Supply a type converter, even though it's a plain type converter, to get around ConfigurationProperty's internal // Enum conversion routine. The internal one is case-sensitive, we want this to be case-insensitive. readonly ConfigurationProperty bypassonlocal = new ConfigurationProperty(ConfigurationStrings.BypassOnLocal, typeof(BypassOnLocalValues), BypassOnLocalValues.Unspecified, new EnumConverter(typeof(BypassOnLocalValues)), null, ConfigurationPropertyOptions.None); readonly ConfigurationProperty proxyaddress = new ConfigurationProperty(ConfigurationStrings.ProxyAddress, typeof(Uri), null, new UriTypeConverter(UriKind.Absolute), null, ConfigurationPropertyOptions.None); readonly ConfigurationProperty usesystemdefault = new ConfigurationProperty(ConfigurationStrings.UseSystemDefault, typeof(UseSystemDefaultValues), UseSystemDefaultValues.Unspecified, new EnumConverter(typeof(UseSystemDefaultValues)), null, ConfigurationPropertyOptions.None); } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net.Configuration { using System; using System.Xml; using System.Configuration; using System.Reflection; using System.ComponentModel; using System.Security.Permissions; public sealed class ProxyElement : ConfigurationElement { public enum BypassOnLocalValues { Unspecified = -1, False = 0, True = 1, } public enum UseSystemDefaultValues { Unspecified = -1, False = 0, True = 1, } public enum AutoDetectValues { Unspecified = -1, False = 0, True = 1, } public ProxyElement() { this.properties.Add(this.autoDetect); this.properties.Add(this.scriptLocation); this.properties.Add(this.bypassonlocal); this.properties.Add(this.proxyaddress); this.properties.Add(this.usesystemdefault); } protected override ConfigurationPropertyCollection Properties { get { return this.properties; } } [ConfigurationProperty(ConfigurationStrings.AutoDetect, DefaultValue=AutoDetectValues.Unspecified)] public AutoDetectValues AutoDetect { get { return (AutoDetectValues)this[this.autoDetect]; } set { this[this.autoDetect] = value; } } [ConfigurationProperty(ConfigurationStrings.ScriptLocation)] public Uri ScriptLocation { get { return (Uri)this[this.scriptLocation]; } set { this[this.scriptLocation] = value; } } [ConfigurationProperty(ConfigurationStrings.BypassOnLocal, DefaultValue=(BypassOnLocalValues) BypassOnLocalValues.Unspecified)] public BypassOnLocalValues BypassOnLocal { get { return (BypassOnLocalValues) this[this.bypassonlocal]; } set { this[this.bypassonlocal] = value; } } [ConfigurationProperty(ConfigurationStrings.ProxyAddress)] public Uri ProxyAddress { get { return (Uri) this[this.proxyaddress]; } set { this[this.proxyaddress] = value; } } [ConfigurationProperty(ConfigurationStrings.UseSystemDefault, DefaultValue=(UseSystemDefaultValues) UseSystemDefaultValues.Unspecified)] public UseSystemDefaultValues UseSystemDefault { get { return (UseSystemDefaultValues)this[this.usesystemdefault]; } set { this[this.usesystemdefault] = value; } } ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection(); readonly ConfigurationProperty autoDetect = new ConfigurationProperty(ConfigurationStrings.AutoDetect, typeof(AutoDetectValues), AutoDetectValues.Unspecified, new EnumConverter(typeof(AutoDetectValues)), null, ConfigurationPropertyOptions.None); readonly ConfigurationProperty scriptLocation = new ConfigurationProperty(ConfigurationStrings.ScriptLocation, typeof(Uri), null, new UriTypeConverter(UriKind.Absolute), null, ConfigurationPropertyOptions.None); // Supply a type converter, even though it's a plain type converter, to get around ConfigurationProperty's internal // Enum conversion routine. The internal one is case-sensitive, we want this to be case-insensitive. readonly ConfigurationProperty bypassonlocal = new ConfigurationProperty(ConfigurationStrings.BypassOnLocal, typeof(BypassOnLocalValues), BypassOnLocalValues.Unspecified, new EnumConverter(typeof(BypassOnLocalValues)), null, ConfigurationPropertyOptions.None); readonly ConfigurationProperty proxyaddress = new ConfigurationProperty(ConfigurationStrings.ProxyAddress, typeof(Uri), null, new UriTypeConverter(UriKind.Absolute), null, ConfigurationPropertyOptions.None); readonly ConfigurationProperty usesystemdefault = new ConfigurationProperty(ConfigurationStrings.UseSystemDefault, typeof(UseSystemDefaultValues), UseSystemDefaultValues.Unspecified, new EnumConverter(typeof(UseSystemDefaultValues)), null, ConfigurationPropertyOptions.None); } } // 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
- CodeDirectoryCompiler.cs
- WebPartTransformerCollection.cs
- Rectangle.cs
- PlatformCulture.cs
- MultipleCopiesCollection.cs
- ProxyAttribute.cs
- MetadataCache.cs
- RangeValuePatternIdentifiers.cs
- ProtectedProviderSettings.cs
- ProgressBarRenderer.cs
- ListView.cs
- DrawToolTipEventArgs.cs
- InvalidateEvent.cs
- ClipboardProcessor.cs
- EmbeddedMailObjectsCollection.cs
- ConfigurationSectionGroup.cs
- TreeViewTemplateSelector.cs
- OrderByQueryOptionExpression.cs
- StandardCommands.cs
- Table.cs
- QuaternionRotation3D.cs
- TextEvent.cs
- DateTimeFormatInfo.cs
- ExceptionHelpers.cs
- AdvancedBindingEditor.cs
- ListControlConvertEventArgs.cs
- PropertyInformationCollection.cs
- Guid.cs
- InfoCardSchemas.cs
- WeakEventTable.cs
- NonPrimarySelectionGlyph.cs
- TrustManager.cs
- KerberosTicketHashIdentifierClause.cs
- Stroke.cs
- DoubleAnimationUsingPath.cs
- RbTree.cs
- TypographyProperties.cs
- WebWorkflowRole.cs
- HotSpotCollection.cs
- DrawingBrush.cs
- ProfileSettings.cs
- ImageAttributes.cs
- TripleDESCryptoServiceProvider.cs
- InlineObject.cs
- AlphabetConverter.cs
- RemotingServices.cs
- CommonProperties.cs
- QilTernary.cs
- RawTextInputReport.cs
- BindingContext.cs
- MemberHolder.cs
- MsmqProcessProtocolHandler.cs
- ImageField.cs
- ColumnMapTranslator.cs
- SectionVisual.cs
- PageContent.cs
- CodeTypeOfExpression.cs
- HttpStreams.cs
- XmlQueryOutput.cs
- sitestring.cs
- ProfessionalColors.cs
- SqlBooleanizer.cs
- HyperLinkField.cs
- ObjectItemLoadingSessionData.cs
- FlowPosition.cs
- ImageAutomationPeer.cs
- GZipStream.cs
- Parameter.cs
- CloseSequenceResponse.cs
- MatrixTransform3D.cs
- GenerateScriptTypeAttribute.cs
- XmlSchemaObjectCollection.cs
- AbstractDataSvcMapFileLoader.cs
- XmlBaseReader.cs
- SerializationObjectManager.cs
- StickyNoteAnnotations.cs
- InfiniteTimeSpanConverter.cs
- NavigationHelper.cs
- EdmPropertyAttribute.cs
- InvalidComObjectException.cs
- StrongNameUtility.cs
- ICspAsymmetricAlgorithm.cs
- ExceptionValidationRule.cs
- SelectiveScrollingGrid.cs
- FileLogRecordHeader.cs
- SqlDataSourceView.cs
- DefaultHttpHandler.cs
- AnnotationStore.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- IdentityModelStringsVersion1.cs
- DataTemplateSelector.cs
- SettingsAttributeDictionary.cs
- StaticExtension.cs
- ConcurrentBag.cs
- XmlSchemaChoice.cs
- CacheRequest.cs
- IRCollection.cs
- ConfigXmlComment.cs
- EntitySqlQueryState.cs
- SQLGuidStorage.cs