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
- TickBar.cs
- CachedRequestParams.cs
- TcpConnectionPool.cs
- Vector3DIndependentAnimationStorage.cs
- CodeAssignStatement.cs
- DesignerActionUI.cs
- PasswordRecovery.cs
- XmlnsDictionary.cs
- HttpCapabilitiesBase.cs
- MimeTypeMapper.cs
- WebPartConnectionsCloseVerb.cs
- XamlRtfConverter.cs
- __FastResourceComparer.cs
- QuaternionRotation3D.cs
- MappingMetadataHelper.cs
- IChannel.cs
- Thread.cs
- RuleInfoComparer.cs
- SecurityTokenValidationException.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- _RequestCacheProtocol.cs
- TimeoutValidationAttribute.cs
- TreeViewEvent.cs
- _UncName.cs
- LinqDataSourceInsertEventArgs.cs
- ExpandCollapsePattern.cs
- NonClientArea.cs
- SafeSerializationManager.cs
- ResourceType.cs
- StandardBindingOptionalReliableSessionElement.cs
- ZoneLinkButton.cs
- ConsoleTraceListener.cs
- PrePostDescendentsWalker.cs
- TablePattern.cs
- SqlUserDefinedTypeAttribute.cs
- DbSourceCommand.cs
- OpenFileDialog.cs
- TextFormattingConverter.cs
- LayoutUtils.cs
- AmbiguousMatchException.cs
- VariableBinder.cs
- TokenBasedSetEnumerator.cs
- TimeoutHelper.cs
- ActivityCodeDomSerializer.cs
- QueryParameter.cs
- DbConnectionPoolCounters.cs
- PrintingPermission.cs
- LocalBuilder.cs
- XhtmlMobileTextWriter.cs
- InstanceStoreQueryResult.cs
- UriWriter.cs
- HostSecurityManager.cs
- AuthenticationService.cs
- DragDrop.cs
- EditorZoneBase.cs
- TimeSpanSecondsConverter.cs
- PointLightBase.cs
- TransactionFilter.cs
- SectionXmlInfo.cs
- ClientFormsAuthenticationMembershipProvider.cs
- ProfilePropertySettings.cs
- BrushMappingModeValidation.cs
- X509CertificateValidator.cs
- PerformanceCounterCategory.cs
- MemberMaps.cs
- ActivityExecutionWorkItem.cs
- DataGridCellAutomationPeer.cs
- CopyEncoder.cs
- MemberProjectedSlot.cs
- BoundingRectTracker.cs
- SizeFConverter.cs
- PointCollection.cs
- CngAlgorithm.cs
- CallTemplateAction.cs
- RpcResponse.cs
- ListBoxItemAutomationPeer.cs
- UnauthorizedAccessException.cs
- TableRowGroup.cs
- GACIdentityPermission.cs
- DaylightTime.cs
- DoubleKeyFrameCollection.cs
- TraceUtility.cs
- SmiConnection.cs
- ToolStripPanelRow.cs
- ExpressionBuilderCollection.cs
- VisualProxy.cs
- MemberHolder.cs
- IListConverters.cs
- SettingsProviderCollection.cs
- MemberMaps.cs
- AudioSignalProblemOccurredEventArgs.cs
- RelativeSource.cs
- SHA1Cng.cs
- ClickablePoint.cs
- XsdValidatingReader.cs
- util.cs
- VisualBasic.cs
- SrgsElement.cs
- TableParaClient.cs
- SiteMembershipCondition.cs