Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / Configuration / SchemeSettingElement.cs / 1305376 / SchemeSettingElement.cs
using System; using System.Diagnostics; namespace System.Configuration { public sealed class SchemeSettingElement : ConfigurationElement { private static readonly ConfigurationPropertyCollection properties; private static readonly ConfigurationProperty name; private static readonly ConfigurationProperty genericUriParserOptions; static SchemeSettingElement() { name = new ConfigurationProperty(CommonConfigurationStrings.SchemeName, typeof(string), null, ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey); genericUriParserOptions = new ConfigurationProperty(CommonConfigurationStrings.GenericUriParserOptions, typeof(GenericUriParserOptions), GenericUriParserOptions.Default, ConfigurationPropertyOptions.IsRequired); properties = new ConfigurationPropertyCollection(); properties.Add(name); properties.Add(genericUriParserOptions); } [ConfigurationProperty(CommonConfigurationStrings.SchemeName, DefaultValue = null, IsRequired = true, IsKey = true)] public string Name { get { return (string)this[name]; } } [ConfigurationProperty(CommonConfigurationStrings.GenericUriParserOptions, DefaultValue = ConfigurationPropertyOptions.None, IsRequired = true)] public GenericUriParserOptions GenericUriParserOptions { get { return (GenericUriParserOptions)this[genericUriParserOptions]; } } protected override ConfigurationPropertyCollection Properties { get { return properties; } } } internal sealed class SchemeSettingInternal { private string name; private GenericUriParserOptions options; public SchemeSettingInternal(string name, GenericUriParserOptions options) { Debug.Assert(name != null, "'name' must not be null."); this.name = name.ToLowerInvariant(); this.options = options; } public string Name { get { return name; } } public GenericUriParserOptions Options { get { return options; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.Diagnostics; namespace System.Configuration { public sealed class SchemeSettingElement : ConfigurationElement { private static readonly ConfigurationPropertyCollection properties; private static readonly ConfigurationProperty name; private static readonly ConfigurationProperty genericUriParserOptions; static SchemeSettingElement() { name = new ConfigurationProperty(CommonConfigurationStrings.SchemeName, typeof(string), null, ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey); genericUriParserOptions = new ConfigurationProperty(CommonConfigurationStrings.GenericUriParserOptions, typeof(GenericUriParserOptions), GenericUriParserOptions.Default, ConfigurationPropertyOptions.IsRequired); properties = new ConfigurationPropertyCollection(); properties.Add(name); properties.Add(genericUriParserOptions); } [ConfigurationProperty(CommonConfigurationStrings.SchemeName, DefaultValue = null, IsRequired = true, IsKey = true)] public string Name { get { return (string)this[name]; } } [ConfigurationProperty(CommonConfigurationStrings.GenericUriParserOptions, DefaultValue = ConfigurationPropertyOptions.None, IsRequired = true)] public GenericUriParserOptions GenericUriParserOptions { get { return (GenericUriParserOptions)this[genericUriParserOptions]; } } protected override ConfigurationPropertyCollection Properties { get { return properties; } } } internal sealed class SchemeSettingInternal { private string name; private GenericUriParserOptions options; public SchemeSettingInternal(string name, GenericUriParserOptions options) { Debug.Assert(name != null, "'name' must not be null."); this.name = name.ToLowerInvariant(); this.options = options; } public string Name { get { return name; } } public GenericUriParserOptions Options { get { return options; } } } } // 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
- Rijndael.cs
- TreeNodeEventArgs.cs
- RegularExpressionValidator.cs
- VariantWrapper.cs
- Control.cs
- TextTreeRootTextBlock.cs
- ProtocolsConfiguration.cs
- EntityKeyElement.cs
- VoiceInfo.cs
- VisualTreeUtils.cs
- TimeSpanStorage.cs
- DbProviderFactories.cs
- GeometryGroup.cs
- DesignerSerializerAttribute.cs
- URLIdentityPermission.cs
- DbConnectionStringBuilder.cs
- DataPagerCommandEventArgs.cs
- RequestCache.cs
- StructuredTypeInfo.cs
- DataListCommandEventArgs.cs
- SoapExtension.cs
- IgnoreSection.cs
- SQLDateTime.cs
- SessionMode.cs
- PageAction.cs
- DataGridViewCellStateChangedEventArgs.cs
- SoapExtensionTypeElement.cs
- PatternMatcher.cs
- InfoCard.cs
- DetailsViewDeleteEventArgs.cs
- GroupJoinQueryOperator.cs
- BamlRecordHelper.cs
- IdentifierCollection.cs
- ValueCollectionParameterReader.cs
- CommandEventArgs.cs
- UxThemeWrapper.cs
- FileDetails.cs
- ProcessModelInfo.cs
- UpdatePanelTrigger.cs
- Pen.cs
- FileEnumerator.cs
- StorageInfo.cs
- EventHandlerService.cs
- WebPartTransformerAttribute.cs
- Debug.cs
- HScrollProperties.cs
- InlineCategoriesDocument.cs
- TdsEnums.cs
- DerivedKeyCachingSecurityTokenSerializer.cs
- TransportContext.cs
- StringResourceManager.cs
- Label.cs
- SerializerProvider.cs
- DocumentPageHost.cs
- TemplateKeyConverter.cs
- bidPrivateBase.cs
- DesignerDataColumn.cs
- CounterSample.cs
- SerializationSectionGroup.cs
- StatusBarDrawItemEvent.cs
- XmlSchemaSequence.cs
- ImplicitInputBrush.cs
- WebPartEventArgs.cs
- ContextMenuStripGroup.cs
- DBBindings.cs
- BamlStream.cs
- CatalogPartChrome.cs
- IOException.cs
- ElapsedEventArgs.cs
- TextModifier.cs
- NetSectionGroup.cs
- StringPropertyBuilder.cs
- _LocalDataStore.cs
- FormViewInsertedEventArgs.cs
- MetafileHeaderEmf.cs
- DataTableCollection.cs
- Int32AnimationUsingKeyFrames.cs
- ViewStateException.cs
- Nullable.cs
- PeerCollaboration.cs
- RadioButtonStandardAdapter.cs
- SmiEventSink.cs
- CodeAttributeDeclaration.cs
- sqlmetadatafactory.cs
- InheritanceRules.cs
- AdapterSwitches.cs
- WebServiceHandlerFactory.cs
- precedingsibling.cs
- Exceptions.cs
- MimeTypeMapper.cs
- TypeDescriptionProviderAttribute.cs
- PowerStatus.cs
- FixedTextPointer.cs
- ElementProxy.cs
- DBSqlParser.cs
- WindowExtensionMethods.cs
- ElapsedEventArgs.cs
- WebHttpElement.cs
- Visual3D.cs
- ConfigXmlSignificantWhitespace.cs