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
- ForEachAction.cs
- ObjectParameterCollection.cs
- FillRuleValidation.cs
- TraceUtils.cs
- clipboard.cs
- EventBookmark.cs
- BaseTemplatedMobileComponentEditor.cs
- CookielessHelper.cs
- DataGridTable.cs
- TabControlCancelEvent.cs
- RSAOAEPKeyExchangeFormatter.cs
- XsdCachingReader.cs
- ProxySimple.cs
- VirtualPathProvider.cs
- ToolStripDropDownMenu.cs
- securitycriticaldataClass.cs
- GB18030Encoding.cs
- _ChunkParse.cs
- Opcode.cs
- AnimationTimeline.cs
- SQLBytes.cs
- TextElementCollection.cs
- QueryExtender.cs
- XmlDocumentFragment.cs
- Component.cs
- ObjectDataSourceEventArgs.cs
- WindowsStatic.cs
- OleDbCommandBuilder.cs
- TypeUnloadedException.cs
- wmiprovider.cs
- WindowsListViewGroupSubsetLink.cs
- _IPv6Address.cs
- XmlSchemaCollection.cs
- PolicyManager.cs
- ReferentialConstraint.cs
- EntityClassGenerator.cs
- ActivatableWorkflowsQueryResult.cs
- EdmConstants.cs
- ExtendedPropertyCollection.cs
- XmlSchemaExporter.cs
- SqlInternalConnectionTds.cs
- CookieParameter.cs
- Oci.cs
- ObjectHandle.cs
- RijndaelManagedTransform.cs
- LinkClickEvent.cs
- SqlFunctions.cs
- BamlTreeMap.cs
- SAPIEngineTypes.cs
- AnonymousIdentificationModule.cs
- MD5HashHelper.cs
- TableItemProviderWrapper.cs
- oledbconnectionstring.cs
- FacetChecker.cs
- Parameter.cs
- XmlSignatureProperties.cs
- TypeDescriptionProviderAttribute.cs
- DotExpr.cs
- CodeTypeDelegate.cs
- Int16AnimationBase.cs
- RSAOAEPKeyExchangeFormatter.cs
- PrincipalPermissionMode.cs
- TokenizerHelper.cs
- CreateUserErrorEventArgs.cs
- FileSystemEventArgs.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- DocumentSequence.cs
- OdbcErrorCollection.cs
- Subtree.cs
- StaticContext.cs
- HierarchicalDataBoundControlAdapter.cs
- FormsAuthenticationUserCollection.cs
- HostingEnvironmentSection.cs
- BitmapEffect.cs
- ByteStorage.cs
- HtmlForm.cs
- ParallelTimeline.cs
- LinqDataSourceDisposeEventArgs.cs
- ExpressionTable.cs
- OpenTypeCommon.cs
- _FtpControlStream.cs
- XsltCompileContext.cs
- DataServiceRequestOfT.cs
- ScrollProperties.cs
- NativeMethods.cs
- SqlConnectionPoolProviderInfo.cs
- ViewGenerator.cs
- BooleanToSelectiveScrollingOrientationConverter.cs
- XMLSchema.cs
- UrlAuthFailedErrorFormatter.cs
- CompilationSection.cs
- HttpMethodConstraint.cs
- ArraySegment.cs
- SocketInformation.cs
- PasswordRecovery.cs
- IpcClientChannel.cs
- CopyCodeAction.cs
- ConnectivityStatus.cs
- HeaderElement.cs
- EventLogPermissionAttribute.cs