Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- WindowsSysHeader.cs
- ConnectionInterfaceCollection.cs
- ToolStripSplitButton.cs
- HttpRuntimeSection.cs
- OdbcParameterCollection.cs
- StdValidatorsAndConverters.cs
- ScaleTransform.cs
- ClassGenerator.cs
- WebBrowserUriTypeConverter.cs
- Variant.cs
- Animatable.cs
- CompensationExtension.cs
- FontStretches.cs
- DATA_BLOB.cs
- MultiByteCodec.cs
- SimpleTypeResolver.cs
- CreateRefExpr.cs
- CodeConstructor.cs
- ImageClickEventArgs.cs
- XmlSchemaExporter.cs
- UrlPath.cs
- HtmlElementCollection.cs
- CreateUserErrorEventArgs.cs
- TokenBasedSet.cs
- JsonCollectionDataContract.cs
- WebExceptionStatus.cs
- MetafileEditor.cs
- FindCriteriaCD1.cs
- MiniConstructorInfo.cs
- LinearQuaternionKeyFrame.cs
- Location.cs
- GridViewEditEventArgs.cs
- ForEachAction.cs
- ReferenceEqualityComparer.cs
- EventManager.cs
- ConsumerConnectionPoint.cs
- HandleRef.cs
- XmlSerializer.cs
- Popup.cs
- HtmlInputImage.cs
- DateTimeConverter.cs
- DataProtection.cs
- FormsAuthenticationCredentials.cs
- SynchronizedInputPattern.cs
- AdRotator.cs
- PhysicalAddress.cs
- OverrideMode.cs
- BulletedList.cs
- ListBindableAttribute.cs
- Delegate.cs
- WinFormsUtils.cs
- DoubleUtil.cs
- PageCache.cs
- MimeMultiPart.cs
- TransformValueSerializer.cs
- DbgUtil.cs
- AssemblyName.cs
- TransactionBridge.cs
- Stack.cs
- HttpWebRequest.cs
- HtmlInputControl.cs
- ExecutionScope.cs
- MaskDescriptor.cs
- ObjectDataSourceDisposingEventArgs.cs
- Processor.cs
- AccessDataSource.cs
- NavigateEvent.cs
- FileLoadException.cs
- WebPartPersonalization.cs
- Constant.cs
- WebServiceErrorEvent.cs
- Publisher.cs
- ConfigurationCollectionAttribute.cs
- JsonStringDataContract.cs
- HtmlElementEventArgs.cs
- TextProperties.cs
- RoleServiceManager.cs
- BrowserCapabilitiesCodeGenerator.cs
- MouseGesture.cs
- AssociatedControlConverter.cs
- DesignerWithHeader.cs
- VirtualDirectoryMapping.cs
- MetadataSource.cs
- Events.cs
- DocumentViewerAutomationPeer.cs
- OdbcConnectionHandle.cs
- RegexGroup.cs
- HtmlSelect.cs
- XmlMapping.cs
- MediaScriptCommandRoutedEventArgs.cs
- SqlConnectionPoolProviderInfo.cs
- PointCollectionValueSerializer.cs
- ZeroOpNode.cs
- Convert.cs
- EmbeddedMailObjectCollectionEditor.cs
- FacetChecker.cs
- objectquery_tresulttype.cs
- InternalConfigEventArgs.cs
- NativeCompoundFileAPIs.cs
- MenuEventArgs.cs