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
- NumericExpr.cs
- NamedPipeConnectionPool.cs
- QueryParameter.cs
- SHA512Managed.cs
- EntityModelBuildProvider.cs
- Math.cs
- TransactionsSectionGroup.cs
- SecurityTokenSpecification.cs
- PeerInvitationResponse.cs
- Convert.cs
- IDReferencePropertyAttribute.cs
- NativeMethods.cs
- SoapMessage.cs
- Verify.cs
- ItemCollection.cs
- StreamingContext.cs
- ToggleButton.cs
- ResourceAssociationType.cs
- ColumnHeaderConverter.cs
- TcpSocketManager.cs
- EntityClassGenerator.cs
- DataControlFieldCollection.cs
- SID.cs
- rsa.cs
- Attributes.cs
- RegisteredHiddenField.cs
- GenericTypeParameterConverter.cs
- COAUTHINFO.cs
- datacache.cs
- FontInfo.cs
- HtmlElementEventArgs.cs
- ToolStripDropDownClosedEventArgs.cs
- DropShadowEffect.cs
- InProcStateClientManager.cs
- AncestorChangedEventArgs.cs
- SQLRoleProvider.cs
- FlagsAttribute.cs
- RegexCompiler.cs
- MexHttpsBindingCollectionElement.cs
- RectangleHotSpot.cs
- ConnectionConsumerAttribute.cs
- FormViewUpdatedEventArgs.cs
- ChtmlImageAdapter.cs
- RequestSecurityToken.cs
- URI.cs
- XsltInput.cs
- XLinq.cs
- CustomErrorsSection.cs
- IntegerFacetDescriptionElement.cs
- ClientRuntimeConfig.cs
- ModuleConfigurationInfo.cs
- CorePropertiesFilter.cs
- ITreeGenerator.cs
- ContentTypeSettingDispatchMessageFormatter.cs
- WorkflowCommandExtensionItem.cs
- FormsAuthentication.cs
- MarshalByValueComponent.cs
- SqlDataSource.cs
- InvalidOperationException.cs
- StreamResourceInfo.cs
- IndependentlyAnimatedPropertyMetadata.cs
- SendActivityEventArgs.cs
- QueryableFilterRepeater.cs
- BinaryMessageEncoder.cs
- unsafenativemethodsother.cs
- ScriptingSectionGroup.cs
- WebEventCodes.cs
- CodeCatchClause.cs
- HtmlEmptyTagControlBuilder.cs
- SqlGatherConsumedAliases.cs
- MetadataItemSerializer.cs
- InitializationEventAttribute.cs
- GreenMethods.cs
- IndentedTextWriter.cs
- ToolStripScrollButton.cs
- SqlHelper.cs
- SmiEventSink_DeferedProcessing.cs
- AssemblyContextControlItem.cs
- SystemIPAddressInformation.cs
- HtmlMeta.cs
- CompilerParameters.cs
- TraceFilter.cs
- assertwrapper.cs
- AssemblySettingAttributes.cs
- DashStyle.cs
- PermissionSetTriple.cs
- ItemType.cs
- Brush.cs
- DbTransaction.cs
- DocumentPageView.cs
- SecurityTokenSerializer.cs
- ScrollEvent.cs
- EventDescriptorCollection.cs
- XmlnsDefinitionAttribute.cs
- RayHitTestParameters.cs
- XmlEnumAttribute.cs
- BindingGroup.cs
- CacheForPrimitiveTypes.cs
- ProviderCommandInfoUtils.cs
- GlobalDataBindingHandler.cs