Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Configuration / System / Configuration / NameValueConfigurationElement.cs / 1 / NameValueConfigurationElement.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* * ImmutableCollections * * Copyright (c) 2004 Microsoft Corporation */ using System; using System.Collections; using System.Collections.Specialized; using System.Net; using System.Configuration; // // This file contains configuration collections that are used by multiple sections // namespace System.Configuration { public sealed class NameValueConfigurationElement : ConfigurationElement { private static ConfigurationPropertyCollection _properties; private static readonly ConfigurationProperty _propName = new ConfigurationProperty("name", typeof(string), String.Empty, ConfigurationPropertyOptions.IsKey); private static readonly ConfigurationProperty _propValue = new ConfigurationProperty("value", typeof(string), String.Empty, ConfigurationPropertyOptions.None); static NameValueConfigurationElement() { // Property initialization _properties = new ConfigurationPropertyCollection(); _properties.Add(_propName); _properties.Add(_propValue); } protected internal override ConfigurationPropertyCollection Properties { get { return _properties; } } // // Constructor // internal NameValueConfigurationElement() { } public NameValueConfigurationElement(string name, string value) { base[_propName] = name; base[_propValue] = value; } // // Properties // // // ConfigurationPropertyOptions.IsKey="true" // [ConfigurationProperty("name", IsKey = true, DefaultValue = "")] public string Name { get { return (string)base[_propName]; } } [ConfigurationProperty("value", DefaultValue = "")] public string Value { get { return (string)base[_propValue]; } set { base[_propValue] = value; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* * ImmutableCollections * * Copyright (c) 2004 Microsoft Corporation */ using System; using System.Collections; using System.Collections.Specialized; using System.Net; using System.Configuration; // // This file contains configuration collections that are used by multiple sections // namespace System.Configuration { public sealed class NameValueConfigurationElement : ConfigurationElement { private static ConfigurationPropertyCollection _properties; private static readonly ConfigurationProperty _propName = new ConfigurationProperty("name", typeof(string), String.Empty, ConfigurationPropertyOptions.IsKey); private static readonly ConfigurationProperty _propValue = new ConfigurationProperty("value", typeof(string), String.Empty, ConfigurationPropertyOptions.None); static NameValueConfigurationElement() { // Property initialization _properties = new ConfigurationPropertyCollection(); _properties.Add(_propName); _properties.Add(_propValue); } protected internal override ConfigurationPropertyCollection Properties { get { return _properties; } } // // Constructor // internal NameValueConfigurationElement() { } public NameValueConfigurationElement(string name, string value) { base[_propName] = name; base[_propValue] = value; } // // Properties // // // ConfigurationPropertyOptions.IsKey="true" // [ConfigurationProperty("name", IsKey = true, DefaultValue = "")] public string Name { get { return (string)base[_propName]; } } [ConfigurationProperty("value", DefaultValue = "")] public string Value { get { return (string)base[_propValue]; } set { base[_propValue] = value; } } } } // 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
- WebBrowserEvent.cs
- XamlToRtfParser.cs
- ObjectListDataBindEventArgs.cs
- ResumeStoryboard.cs
- UInt16Storage.cs
- FormsAuthenticationEventArgs.cs
- SnapLine.cs
- WrappedReader.cs
- Variant.cs
- DLinqDataModelProvider.cs
- OutOfProcStateClientManager.cs
- BaseValidator.cs
- PrintPageEvent.cs
- CmsInterop.cs
- IItemProperties.cs
- MetaDataInfo.cs
- PersistChildrenAttribute.cs
- BaseParser.cs
- AsyncDataRequest.cs
- PropertyInformationCollection.cs
- DoubleAnimationUsingPath.cs
- ProxyWebPartConnectionCollection.cs
- TextSelectionProcessor.cs
- DocumentPage.cs
- UriParserTemplates.cs
- SqlGatherConsumedAliases.cs
- Application.cs
- Win32SafeHandles.cs
- GPStream.cs
- ChtmlTextWriter.cs
- SmtpNetworkElement.cs
- ToolboxItem.cs
- DLinqColumnProvider.cs
- ChangePassword.cs
- CheckBoxPopupAdapter.cs
- PolyBezierSegment.cs
- bindurihelper.cs
- SqlVersion.cs
- UInt16Storage.cs
- TypeInitializationException.cs
- ServiceElementCollection.cs
- EmptyControlCollection.cs
- Rect3DConverter.cs
- LineServicesRun.cs
- sortedlist.cs
- ServiceModelPerformanceCounters.cs
- SerializerProvider.cs
- PenCursorManager.cs
- SafeBitVector32.cs
- AssociativeAggregationOperator.cs
- CanonicalFontFamilyReference.cs
- NominalTypeEliminator.cs
- StickyNoteHelper.cs
- RSAProtectedConfigurationProvider.cs
- SettingsProperty.cs
- VisualBasicDesignerHelper.cs
- SystemWebExtensionsSectionGroup.cs
- WebPartConnectionsCloseVerb.cs
- safesecurityhelperavalon.cs
- RegisteredScript.cs
- CollectionViewProxy.cs
- initElementDictionary.cs
- COMException.cs
- SharedConnectionWorkflowTransactionService.cs
- X509CertificateCollection.cs
- _ScatterGatherBuffers.cs
- PeerHelpers.cs
- PropertyMappingExceptionEventArgs.cs
- CompositeKey.cs
- Trace.cs
- RefExpr.cs
- SqlLiftWhereClauses.cs
- TextBoxDesigner.cs
- GroupBoxAutomationPeer.cs
- ContextMarshalException.cs
- Vector3DConverter.cs
- UInt32.cs
- SqlCrossApplyToCrossJoin.cs
- ConfigurationManager.cs
- StructuredType.cs
- WebServiceTypeData.cs
- XmlSchemaSearchPattern.cs
- TypeDescriptionProviderAttribute.cs
- AutomationElement.cs
- AnnotationResource.cs
- ToolBarButtonClickEvent.cs
- Line.cs
- ContentTextAutomationPeer.cs
- DataGridItemCollection.cs
- FileNotFoundException.cs
- EnumType.cs
- XmlUTF8TextWriter.cs
- AspNetHostingPermission.cs
- HtmlButton.cs
- EmptyControlCollection.cs
- CircleHotSpot.cs
- WindowsSysHeader.cs
- BrowserInteropHelper.cs
- userdatakeys.cs
- PathSegmentCollection.cs