Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- FormatterServices.cs
- CriticalFinalizerObject.cs
- MappingItemCollection.cs
- InstanceLockedException.cs
- httpapplicationstate.cs
- SecurityRuntime.cs
- IisTraceListener.cs
- ServicePoint.cs
- DbUpdateCommandTree.cs
- TableLayoutPanelBehavior.cs
- Vector.cs
- NameSpaceExtractor.cs
- SqlRetyper.cs
- ValidationResult.cs
- FeedUtils.cs
- ResourceDictionary.cs
- TabItem.cs
- XmlWrappingReader.cs
- DataTransferEventArgs.cs
- BCLDebug.cs
- TransferRequestHandler.cs
- Sql8ConformanceChecker.cs
- SmtpReplyReader.cs
- prefixendpointaddressmessagefilter.cs
- AppManager.cs
- RawAppCommandInputReport.cs
- RootBrowserWindowAutomationPeer.cs
- EnumUnknown.cs
- BinaryCommonClasses.cs
- BlurEffect.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- MimeMapping.cs
- CompiledQuery.cs
- DesignerTransaction.cs
- UnsafeNativeMethods.cs
- ArrayTypeMismatchException.cs
- HttpProfileGroupBase.cs
- PropertyTabChangedEvent.cs
- WebBaseEventKeyComparer.cs
- CustomErrorCollection.cs
- CreateSequence.cs
- HideDisabledControlAdapter.cs
- UdpChannelFactory.cs
- StyleSelector.cs
- DesignerDataColumn.cs
- ListBindingHelper.cs
- CapabilitiesState.cs
- baseaxisquery.cs
- MergeLocalizationDirectives.cs
- ReliableSessionElement.cs
- ContentControl.cs
- XmlDsigSep2000.cs
- ManipulationInertiaStartingEventArgs.cs
- BindingsCollection.cs
- Line.cs
- FileSystemInfo.cs
- TextShapeableCharacters.cs
- XmlSchemaGroupRef.cs
- SelfIssuedAuthAsymmetricKey.cs
- SerialReceived.cs
- BadImageFormatException.cs
- ScriptMethodAttribute.cs
- ProtocolsConfiguration.cs
- ErrorProvider.cs
- ReflectTypeDescriptionProvider.cs
- PngBitmapDecoder.cs
- SerialStream.cs
- ActionItem.cs
- ComboBox.cs
- ProcessHostFactoryHelper.cs
- SoapFault.cs
- FlowDocumentScrollViewer.cs
- HttpInputStream.cs
- BuiltInExpr.cs
- InfoCardSymmetricCrypto.cs
- DbConnectionInternal.cs
- ComboBoxAutomationPeer.cs
- ApplicationSecurityInfo.cs
- Evidence.cs
- GroupBoxRenderer.cs
- ConstructorExpr.cs
- ApplicationInfo.cs
- DeferredBinaryDeserializerExtension.cs
- FileAuthorizationModule.cs
- RenderOptions.cs
- SoapAttributes.cs
- WebControlsSection.cs
- StateElementCollection.cs
- MultiView.cs
- SqlInternalConnectionSmi.cs
- ListViewItem.cs
- WebBrowserHelper.cs
- SystemSounds.cs
- SafeFileMappingHandle.cs
- CoreSwitches.cs
- MemberInfoSerializationHolder.cs
- UnsafeNativeMethods.cs
- NativeMethods.cs
- DrawingBrush.cs
- RepeaterItemCollection.cs