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
- ListItemConverter.cs
- InvokeMemberBinder.cs
- TextDecorationUnitValidation.cs
- ReferencedAssembly.cs
- TextStore.cs
- DocumentReferenceCollection.cs
- ImageFormatConverter.cs
- XhtmlBasicPhoneCallAdapter.cs
- CellNormalizer.cs
- ValidatingPropertiesEventArgs.cs
- SlipBehavior.cs
- EnumConverter.cs
- Listbox.cs
- WrappedDispatcherException.cs
- ScriptReferenceBase.cs
- NullableDoubleAverageAggregationOperator.cs
- TcpProcessProtocolHandler.cs
- Converter.cs
- TreeViewImageGenerator.cs
- ToolStripItemImageRenderEventArgs.cs
- RegistryKey.cs
- ApplicationId.cs
- SessionStateContainer.cs
- GB18030Encoding.cs
- HttpContext.cs
- SignedPkcs7.cs
- EdmFunctionAttribute.cs
- returneventsaver.cs
- Light.cs
- HtmlInputRadioButton.cs
- CodeAssignStatement.cs
- WebPartConnectionsEventArgs.cs
- BindingBase.cs
- PenCursorManager.cs
- InputBinding.cs
- WebServiceEndpoint.cs
- QueryCacheKey.cs
- IODescriptionAttribute.cs
- PointLightBase.cs
- AnnotationDocumentPaginator.cs
- MultipartIdentifier.cs
- StrokeFIndices.cs
- X509ScopedServiceCertificateElement.cs
- AutoResizedEvent.cs
- MenuBase.cs
- WindowsTitleBar.cs
- documentsequencetextview.cs
- ContentElement.cs
- DictionaryContent.cs
- ControlUtil.cs
- Logging.cs
- EditableRegion.cs
- wpf-etw.cs
- AuthenticationSection.cs
- SafeNativeMemoryHandle.cs
- webbrowsersite.cs
- SetterBase.cs
- FactoryId.cs
- Validator.cs
- nulltextnavigator.cs
- Perspective.cs
- EntityDataSourceValidationException.cs
- Utils.cs
- Vector3DCollectionConverter.cs
- XmlIgnoreAttribute.cs
- PresentationAppDomainManager.cs
- EDesignUtil.cs
- ApplyImportsAction.cs
- BaseInfoTable.cs
- ResetableIterator.cs
- MatrixAnimationUsingKeyFrames.cs
- HtmlShim.cs
- SQLGuid.cs
- WebServiceAttribute.cs
- RunWorkerCompletedEventArgs.cs
- GridViewPageEventArgs.cs
- ResolveMatchesApril2005.cs
- VScrollProperties.cs
- RealizationDrawingContextWalker.cs
- HebrewNumber.cs
- SourceFileBuildProvider.cs
- XmlAttributeProperties.cs
- HashHelpers.cs
- TimeSpan.cs
- X509AsymmetricSecurityKey.cs
- UrlMappingsModule.cs
- ScrollEventArgs.cs
- ConfigViewGenerator.cs
- ArrayEditor.cs
- DeviceContext.cs
- ClrPerspective.cs
- PeerInputChannelListener.cs
- PropertyDescriptorComparer.cs
- TextBoxBase.cs
- TextReader.cs
- InstalledFontCollection.cs
- HttpException.cs
- securitymgrsite.cs
- VariableElement.cs
- SQLStringStorage.cs