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
- AuthenticationService.cs
- Console.cs
- CompensatableTransactionScopeActivity.cs
- WebPartVerb.cs
- WorkflowServiceNamespace.cs
- PipeException.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- ConfigurationHelpers.cs
- ConfigsHelper.cs
- PrePrepareMethodAttribute.cs
- IgnoreFileBuildProvider.cs
- DrawingContext.cs
- EventLog.cs
- LogReserveAndAppendState.cs
- StringUtil.cs
- Section.cs
- ResourceSetExpression.cs
- VisualTreeHelper.cs
- Container.cs
- StartUpEventArgs.cs
- TerminatingOperationBehavior.cs
- BindingContext.cs
- ComplexPropertyEntry.cs
- WebPart.cs
- CategoriesDocumentFormatter.cs
- DateTimeValueSerializerContext.cs
- FixedPageAutomationPeer.cs
- OdbcErrorCollection.cs
- util.cs
- RtfToXamlReader.cs
- ErrorStyle.cs
- TextEditorCharacters.cs
- MouseCaptureWithinProperty.cs
- LogReserveAndAppendState.cs
- ComplexLine.cs
- UrlAuthFailedErrorFormatter.cs
- TextTreeObjectNode.cs
- Utils.cs
- BasePropertyDescriptor.cs
- OleDbParameterCollection.cs
- ListViewSortEventArgs.cs
- ManipulationBoundaryFeedbackEventArgs.cs
- StringAttributeCollection.cs
- ListControlDataBindingHandler.cs
- ItemPager.cs
- RowType.cs
- ContentType.cs
- DPTypeDescriptorContext.cs
- SqlCachedBuffer.cs
- KeyBinding.cs
- SqlDataSourceParameterParser.cs
- DateTimeFormatInfo.cs
- ResetableIterator.cs
- LabelEditEvent.cs
- ClassicBorderDecorator.cs
- ContextMenuService.cs
- ExpandableObjectConverter.cs
- WebServiceErrorEvent.cs
- Part.cs
- HttpServerUtilityWrapper.cs
- AttachmentService.cs
- HttpRequestCacheValidator.cs
- DataControlPagerLinkButton.cs
- ValueTable.cs
- TaskScheduler.cs
- SortedDictionary.cs
- XmlReflectionImporter.cs
- DataGridCheckBoxColumn.cs
- SqlProvider.cs
- MediaEntryAttribute.cs
- SimpleHandlerFactory.cs
- NTAccount.cs
- XmlSchemaInfo.cs
- FrameworkContentElementAutomationPeer.cs
- LabelDesigner.cs
- BaseProcessor.cs
- LinqDataSourceValidationException.cs
- StateMachineWorkflowInstance.cs
- WorkflowPageSetupDialog.cs
- FamilyMapCollection.cs
- ScrollEvent.cs
- RadialGradientBrush.cs
- ResizeGrip.cs
- QuestionEventArgs.cs
- OdbcPermission.cs
- Path.cs
- SafeEventLogReadHandle.cs
- SymLanguageVendor.cs
- EmptyEnumerator.cs
- DetailsViewModeEventArgs.cs
- StaticExtension.cs
- CroppedBitmap.cs
- Aes.cs
- HwndAppCommandInputProvider.cs
- MissingManifestResourceException.cs
- securitymgrsite.cs
- IPAddress.cs
- SqlNamer.cs
- ContainerUIElement3D.cs
- ConnectionsZone.cs