Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- Subset.cs
- CodeChecksumPragma.cs
- ToolStripDropTargetManager.cs
- DispatcherFrame.cs
- WinInet.cs
- Utils.cs
- DocumentDesigner.cs
- ToolStripSystemRenderer.cs
- FileDialog_Vista.cs
- Sql8ExpressionRewriter.cs
- XamlFilter.cs
- TrackingValidationObjectDictionary.cs
- EmptyArray.cs
- DesignerGeometryHelper.cs
- _NestedSingleAsyncResult.cs
- XPathSelectionIterator.cs
- ConfigurationPropertyCollection.cs
- IgnoreFileBuildProvider.cs
- ColumnMapCopier.cs
- IntSecurity.cs
- WebControlsSection.cs
- SqlNodeAnnotations.cs
- ObjectReaderCompiler.cs
- DesignerView.cs
- XmlArrayAttribute.cs
- PasswordDeriveBytes.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- FacetEnabledSchemaElement.cs
- ServerType.cs
- RtType.cs
- ObjectDisposedException.cs
- TemplateControlBuildProvider.cs
- StringComparer.cs
- AccessDataSourceView.cs
- DbConnectionStringBuilder.cs
- MessageDecoder.cs
- SqlCommand.cs
- ImageEditor.cs
- UndoUnit.cs
- JapaneseCalendar.cs
- ScriptComponentDescriptor.cs
- TimersDescriptionAttribute.cs
- XmlProcessingInstruction.cs
- ErrorFormatter.cs
- keycontainerpermission.cs
- EndOfStreamException.cs
- GenericTypeParameterConverter.cs
- DbDataSourceEnumerator.cs
- WriteFileContext.cs
- KnownAssembliesSet.cs
- XmlSchemaAttributeGroup.cs
- ToolStripAdornerWindowService.cs
- ErrorWrapper.cs
- SqlTypesSchemaImporter.cs
- DESCryptoServiceProvider.cs
- CompilerCollection.cs
- ApplicationInterop.cs
- ValidationHelper.cs
- WebPartZone.cs
- BeginEvent.cs
- Pkcs9Attribute.cs
- ProfileSettingsCollection.cs
- ListenerChannelContext.cs
- SamlSerializer.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- HttpClientCertificate.cs
- ItemChangedEventArgs.cs
- ComAdminInterfaces.cs
- UnsafeNativeMethods.cs
- ErrorHandler.cs
- WebHttpSecurity.cs
- DataGridViewCellStyleConverter.cs
- CharConverter.cs
- StructuredType.cs
- BStrWrapper.cs
- DBConnection.cs
- DiffuseMaterial.cs
- KeyboardDevice.cs
- GroupLabel.cs
- WebPartMenuStyle.cs
- ChannelProtectionRequirements.cs
- SerializationException.cs
- FixUp.cs
- EndpointAddressMessageFilter.cs
- DPAPIProtectedConfigurationProvider.cs
- ColumnMapTranslator.cs
- Helpers.cs
- _SpnDictionary.cs
- WindowsComboBox.cs
- COM2PictureConverter.cs
- ProgressPage.cs
- DataServiceClientException.cs
- SoapFault.cs
- CompositeTypefaceMetrics.cs
- TreeNodeSelectionProcessor.cs
- SiteMapSection.cs
- DataSysAttribute.cs
- PropertyToken.cs
- WCFServiceClientProxyGenerator.cs
- ThicknessAnimationBase.cs