Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Configuration / System / Configuration / KeyValueInternalCollection.cs / 1 / KeyValueInternalCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Configuration { using System; using System.Xml; using System.Configuration; using System.Collections.Specialized; using System.Collections; using System.IO; using System.Text; // class AppSettingsSection class KeyValueInternalCollection : NameValueCollection { private AppSettingsSection _root = null; public KeyValueInternalCollection(AppSettingsSection root) { _root = root; foreach (KeyValueConfigurationElement element in _root.Settings) { base.Add(element.Key, element.Value); } } public override void Add(String key, String value) { _root.Settings.Add(new KeyValueConfigurationElement(key, value)); base.Add(key, value); } public override void Clear() { _root.Settings.Clear(); base.Clear(); } public override void Remove(string key) { _root.Settings.Remove(key); base.Remove(key); } #if DONT_COMPILE // Unfortunately this is not virtual and we hand out the base collection public new string this[string key] { get { return base[key]; } set { _root.Settings[key] = new KeyValueConfigurationElement(key, value); base[key] = value; } } #endif } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Configuration { using System; using System.Xml; using System.Configuration; using System.Collections.Specialized; using System.Collections; using System.IO; using System.Text; // class AppSettingsSection class KeyValueInternalCollection : NameValueCollection { private AppSettingsSection _root = null; public KeyValueInternalCollection(AppSettingsSection root) { _root = root; foreach (KeyValueConfigurationElement element in _root.Settings) { base.Add(element.Key, element.Value); } } public override void Add(String key, String value) { _root.Settings.Add(new KeyValueConfigurationElement(key, value)); base.Add(key, value); } public override void Clear() { _root.Settings.Clear(); base.Clear(); } public override void Remove(string key) { _root.Settings.Remove(key); base.Remove(key); } #if DONT_COMPILE // Unfortunately this is not virtual and we hand out the base collection public new string this[string key] { get { return base[key]; } set { _root.Settings[key] = new KeyValueConfigurationElement(key, value); base[key] = value; } } #endif } } // 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
- XComponentModel.cs
- MediaTimeline.cs
- EventWaitHandle.cs
- Floater.cs
- SqlServices.cs
- TiffBitmapDecoder.cs
- WebBrowserNavigatedEventHandler.cs
- PropertyConverter.cs
- XmlToDatasetMap.cs
- clipboard.cs
- SiteMapProvider.cs
- ZoomPercentageConverter.cs
- Shape.cs
- XmlQueryRuntime.cs
- QueryableFilterUserControl.cs
- SchemaCollectionCompiler.cs
- HierarchicalDataSourceDesigner.cs
- KeySplineConverter.cs
- WebPartUserCapability.cs
- DataGridCheckBoxColumn.cs
- ConstantProjectedSlot.cs
- SR.Designer.cs
- PromptEventArgs.cs
- PropertySegmentSerializationProvider.cs
- MembershipValidatePasswordEventArgs.cs
- WebPartDisplayMode.cs
- QueryExpression.cs
- CodeGenerator.cs
- SafeNativeMethods.cs
- XmlSortKey.cs
- Region.cs
- Control.cs
- CryptographicAttribute.cs
- StringAnimationUsingKeyFrames.cs
- Validator.cs
- SymbolUsageManager.cs
- PrintPreviewGraphics.cs
- shaperfactoryquerycachekey.cs
- DesignerForm.cs
- CookieParameter.cs
- MessagePropertyAttribute.cs
- SelectionProcessor.cs
- embossbitmapeffect.cs
- CssTextWriter.cs
- SoapReflectionImporter.cs
- SvcMapFileLoader.cs
- ToggleProviderWrapper.cs
- TraceRecord.cs
- GatewayIPAddressInformationCollection.cs
- CapabilitiesState.cs
- ExcCanonicalXml.cs
- TypeConverters.cs
- DoubleUtil.cs
- CompareValidator.cs
- MasterPageCodeDomTreeGenerator.cs
- VirtualizingStackPanel.cs
- UnauthorizedWebPart.cs
- RecordsAffectedEventArgs.cs
- ArgumentException.cs
- LedgerEntryCollection.cs
- SelectedDatesCollection.cs
- ErrorItem.cs
- ConfigXmlText.cs
- Tablet.cs
- SelectionRange.cs
- EmbeddedObject.cs
- WebBrowserUriTypeConverter.cs
- MessageBodyMemberAttribute.cs
- Converter.cs
- InfoCardKeyedHashAlgorithm.cs
- ClaimTypes.cs
- MenuItemStyleCollectionEditor.cs
- mda.cs
- ImageAutomationPeer.cs
- Int32RectValueSerializer.cs
- StyleXamlTreeBuilder.cs
- SecurityTokenException.cs
- WebUtil.cs
- TTSVoice.cs
- CryptoStream.cs
- PixelShader.cs
- SqlBooleanizer.cs
- AstTree.cs
- OletxEnlistment.cs
- Size3DConverter.cs
- FontStretchConverter.cs
- FactoryId.cs
- MarkupExtensionReturnTypeAttribute.cs
- SignatureConfirmations.cs
- sqlinternaltransaction.cs
- AsymmetricSignatureFormatter.cs
- NotImplementedException.cs
- VBCodeProvider.cs
- DbBuffer.cs
- IMembershipProvider.cs
- ADMembershipUser.cs
- BaseValidator.cs
- X509RawDataKeyIdentifierClause.cs
- CornerRadius.cs
- DiagnosticTrace.cs