Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Configuration / System / Configuration / NameValueConfigurationElement.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WindowsFormsLinkLabel.cs
- CodeNamespaceImport.cs
- WorkflowServiceHostFactory.cs
- PropertyRef.cs
- TextServicesContext.cs
- LogicalExpressionTypeConverter.cs
- HttpException.cs
- cookiecontainer.cs
- IndicCharClassifier.cs
- ColumnHeaderConverter.cs
- DbConnectionStringCommon.cs
- KeyValuePair.cs
- MediaTimeline.cs
- ProcessHostConfigUtils.cs
- UnionExpr.cs
- OuterGlowBitmapEffect.cs
- Color.cs
- ItemsControl.cs
- SqlFacetAttribute.cs
- EmptyEnumerable.cs
- HtmlInputText.cs
- HashAlgorithm.cs
- CompoundFileStreamReference.cs
- CodeExporter.cs
- Funcletizer.cs
- KnownIds.cs
- StreamInfo.cs
- HttpBrowserCapabilitiesWrapper.cs
- SizeAnimationBase.cs
- PcmConverter.cs
- BitmapEncoder.cs
- ConstNode.cs
- HtmlHistory.cs
- NameValueCollection.cs
- SessionParameter.cs
- ComEventsMethod.cs
- ToolStripMenuItemDesigner.cs
- ChildrenQuery.cs
- DocumentPropertiesDialog.cs
- HotSpot.cs
- ZeroOpNode.cs
- DbProviderConfigurationHandler.cs
- Attribute.cs
- Control.cs
- CompositeFontInfo.cs
- DataGridViewLinkCell.cs
- BindValidationContext.cs
- FixedStringLookup.cs
- TransformationRules.cs
- PropertyExpression.cs
- SafeSecurityHelper.cs
- NavigationProperty.cs
- Parameter.cs
- DelegateTypeInfo.cs
- PerfService.cs
- TreeNodeStyle.cs
- XmlMemberMapping.cs
- UmAlQuraCalendar.cs
- SoapInteropTypes.cs
- GridItemCollection.cs
- basecomparevalidator.cs
- LinearGradientBrush.cs
- StringPropertyBuilder.cs
- M3DUtil.cs
- System.Data.OracleClient_BID.cs
- SharedPersonalizationStateInfo.cs
- DelegatingTypeDescriptionProvider.cs
- HwndTarget.cs
- TimeSpanOrInfiniteValidator.cs
- BindingBase.cs
- NetworkInterface.cs
- SoapHttpTransportImporter.cs
- ConnectionsZoneDesigner.cs
- ImageBrush.cs
- BamlMapTable.cs
- RequestBringIntoViewEventArgs.cs
- ToolStripManager.cs
- AsyncCallback.cs
- DiffuseMaterial.cs
- TextBlockAutomationPeer.cs
- SimpleHandlerFactory.cs
- Stylesheet.cs
- DeviceFilterDictionary.cs
- TransactionProtocol.cs
- NameValueCollection.cs
- BinaryExpression.cs
- IDReferencePropertyAttribute.cs
- NumericPagerField.cs
- ListViewSelectEventArgs.cs
- KnownIds.cs
- FolderLevelBuildProvider.cs
- fixedPageContentExtractor.cs
- TextBoxLine.cs
- DecimalAnimationBase.cs
- SystemIPGlobalStatistics.cs
- URLMembershipCondition.cs
- FormViewInsertedEventArgs.cs
- PropertyValue.cs
- CommandBinding.cs
- MessageBodyMemberAttribute.cs