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
- UserControlCodeDomTreeGenerator.cs
- EventProviderWriter.cs
- LoadGrammarCompletedEventArgs.cs
- ScrollViewerAutomationPeer.cs
- SerializableTypeCodeDomSerializer.cs
- JsonFaultDetail.cs
- SyntaxCheck.cs
- PageParserFilter.cs
- ObjectQuery.cs
- BaseDataBoundControl.cs
- Int16Storage.cs
- ConnectionStringSettings.cs
- PropertyMappingExceptionEventArgs.cs
- FixedSOMPageElement.cs
- EntityException.cs
- SR.Designer.cs
- ErrorView.xaml.cs
- AttachedAnnotation.cs
- PeerNameRecord.cs
- GridToolTip.cs
- XmlSchemaAny.cs
- StructuralType.cs
- Exceptions.cs
- TemplateBuilder.cs
- Query.cs
- MaskedTextProvider.cs
- WebPartConnection.cs
- ProfileParameter.cs
- MouseEvent.cs
- HttpMethodAttribute.cs
- KeysConverter.cs
- ConfigurationCollectionAttribute.cs
- XmlSchemaSimpleTypeList.cs
- CheckedListBox.cs
- OdbcStatementHandle.cs
- DataColumn.cs
- FixedFlowMap.cs
- RedBlackList.cs
- PathFigureCollection.cs
- Parser.cs
- TextEditorContextMenu.cs
- LinqDataSourceContextData.cs
- AssemblySettingAttributes.cs
- TypeConverterHelper.cs
- DataGridBoundColumn.cs
- prompt.cs
- RequestCacheManager.cs
- EventQueueState.cs
- TextServicesHost.cs
- WizardStepCollectionEditor.cs
- ArrayTypeMismatchException.cs
- EFTableProvider.cs
- XmlCharType.cs
- webclient.cs
- DataSourceProvider.cs
- AtomServiceDocumentSerializer.cs
- GeometryHitTestResult.cs
- BezierSegment.cs
- ChangeDirector.cs
- StylusPlugin.cs
- HttpClientCertificate.cs
- NodeLabelEditEvent.cs
- IItemProperties.cs
- ErrorStyle.cs
- XmlNodeList.cs
- AdapterDictionary.cs
- LineUtil.cs
- DomainConstraint.cs
- WmlPageAdapter.cs
- PolicyFactory.cs
- MailBnfHelper.cs
- RegexGroup.cs
- GraphicsPath.cs
- MouseButtonEventArgs.cs
- ListViewInsertionMark.cs
- BindStream.cs
- Reference.cs
- HtmlTextArea.cs
- CalendarDesigner.cs
- dsa.cs
- SqlParameterizer.cs
- FormViewModeEventArgs.cs
- PropertyInfoSet.cs
- BitmapScalingModeValidation.cs
- TextParagraph.cs
- SmtpReplyReaderFactory.cs
- MetadataArtifactLoaderCompositeResource.cs
- SpellerHighlightLayer.cs
- DrawItemEvent.cs
- XslAstAnalyzer.cs
- JpegBitmapEncoder.cs
- BackStopAuthenticationModule.cs
- SID.cs
- DataObjectMethodAttribute.cs
- DocComment.cs
- PrinterUnitConvert.cs
- ConnectionProviderAttribute.cs
- FollowerQueueCreator.cs
- DummyDataSource.cs
- IFlowDocumentViewer.cs