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
- RoleProviderPrincipal.cs
- LogicalExpr.cs
- RootBrowserWindowAutomationPeer.cs
- DynamicUpdateCommand.cs
- EntityDesignerDataSourceView.cs
- NullReferenceException.cs
- TextEditorTables.cs
- CompilerParameters.cs
- ObjectCache.cs
- ToggleProviderWrapper.cs
- UnsafeNativeMethods.cs
- DataGridViewCellStyleEditor.cs
- ControlFilterExpression.cs
- RequestCachingSection.cs
- QueryableFilterRepeater.cs
- Application.cs
- ContainerUtilities.cs
- FunctionParameter.cs
- SyntaxCheck.cs
- _SecureChannel.cs
- BitmapEffectInputData.cs
- CategoryNameCollection.cs
- PrefixQName.cs
- PlainXmlSerializer.cs
- Int64.cs
- HttpCapabilitiesSectionHandler.cs
- DynamicResourceExtensionConverter.cs
- COAUTHIDENTITY.cs
- ISCIIEncoding.cs
- MemberDescriptor.cs
- FileDataSourceCache.cs
- PartialCachingAttribute.cs
- RemoteWebConfigurationHostServer.cs
- KeyMatchBuilder.cs
- ProxyGenerator.cs
- SerializationTrace.cs
- RoleServiceManager.cs
- ParserOptions.cs
- StringFreezingAttribute.cs
- OpenTypeLayoutCache.cs
- ParseHttpDate.cs
- TreeViewImageIndexConverter.cs
- CacheDict.cs
- Point3DConverter.cs
- Token.cs
- IndexedEnumerable.cs
- SequenceRange.cs
- ISAPIApplicationHost.cs
- CheckBoxDesigner.cs
- ValueTypeFixupInfo.cs
- Timer.cs
- ElementsClipboardData.cs
- QueryHandler.cs
- TileModeValidation.cs
- SID.cs
- VariableBinder.cs
- SafeMILHandleMemoryPressure.cs
- ListenerSingletonConnectionReader.cs
- XmlElementAttributes.cs
- MimeXmlReflector.cs
- DataServiceConfiguration.cs
- TripleDES.cs
- JournalEntry.cs
- SqlDataAdapter.cs
- ConfigurationLocation.cs
- ProfileGroupSettings.cs
- SqlCachedBuffer.cs
- DynamicObjectAccessor.cs
- Bitmap.cs
- EdmTypeAttribute.cs
- FilteredDataSetHelper.cs
- CodeStatementCollection.cs
- ObjRef.cs
- InvalidCastException.cs
- Set.cs
- PasswordPropertyTextAttribute.cs
- BufferedStream.cs
- BitmapEffectCollection.cs
- ComponentSerializationService.cs
- X509ScopedServiceCertificateElementCollection.cs
- HtmlHistory.cs
- DynamicActionMessageFilter.cs
- XamlStyleSerializer.cs
- EntityException.cs
- EntityTypeEmitter.cs
- DrawingGroup.cs
- GridViewPageEventArgs.cs
- ExpressionBinding.cs
- BamlBinaryReader.cs
- Solver.cs
- DataSourceSelectArguments.cs
- CredentialCache.cs
- SQLDoubleStorage.cs
- EmbeddedMailObjectsCollection.cs
- VersionPair.cs
- FtpWebResponse.cs
- WebPartHeaderCloseVerb.cs
- HtmlHead.cs
- HttpListenerContext.cs
- SQLGuidStorage.cs