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
- User.cs
- UnauthorizedAccessException.cs
- ArithmeticException.cs
- ConfigurationLockCollection.cs
- AsyncCallback.cs
- JsonFormatWriterGenerator.cs
- KeyInterop.cs
- AppDomainManager.cs
- WebPageTraceListener.cs
- ProtectedConfiguration.cs
- StackSpiller.Temps.cs
- ByeMessageApril2005.cs
- SqlResolver.cs
- InkPresenterAutomationPeer.cs
- CodeVariableDeclarationStatement.cs
- SystemColorTracker.cs
- NonDualMessageSecurityOverHttp.cs
- TreeViewItem.cs
- TemplateBindingExpressionConverter.cs
- Win32Interop.cs
- XmlSchemaInferenceException.cs
- AsyncPostBackTrigger.cs
- EditorPartCollection.cs
- CallbackValidatorAttribute.cs
- ErrorRuntimeConfig.cs
- DataGridViewCellStyleConverter.cs
- PersonalizationEntry.cs
- XPathAncestorIterator.cs
- CommentEmitter.cs
- SecurityTokenException.cs
- EntityKey.cs
- ReceiveSecurityHeaderElementManager.cs
- ButtonFlatAdapter.cs
- Stack.cs
- DataGridViewAccessibleObject.cs
- Accessible.cs
- ProviderException.cs
- CompositeScriptReferenceEventArgs.cs
- TreeNodeCollection.cs
- PreProcessInputEventArgs.cs
- MimeWriter.cs
- DependencyProperty.cs
- AsyncSerializedWorker.cs
- AppDomainProtocolHandler.cs
- ToolStripComboBox.cs
- MultiTrigger.cs
- xml.cs
- StringUtil.cs
- HostedNamedPipeTransportManager.cs
- SrgsElement.cs
- SelectionList.cs
- XmlDataLoader.cs
- GraphicsContext.cs
- DataSpaceManager.cs
- IImplicitResourceProvider.cs
- PreviewPageInfo.cs
- ActiveXMessageFormatter.cs
- XmlSchemaDatatype.cs
- DataGridViewLinkCell.cs
- StreamGeometryContext.cs
- FamilyMapCollection.cs
- DataGridViewRowConverter.cs
- DependencyPropertyAttribute.cs
- RoleGroup.cs
- MDIClient.cs
- BreakSafeBase.cs
- UndirectedGraph.cs
- WindowsListViewItemStartMenu.cs
- SettingsPropertyNotFoundException.cs
- ProxyBuilder.cs
- MessagePropertyFilter.cs
- ExtenderProvidedPropertyAttribute.cs
- File.cs
- __Error.cs
- BamlLocalizer.cs
- CurrencyManager.cs
- CustomBindingElementCollection.cs
- EventLogPermissionEntry.cs
- TextPenaltyModule.cs
- Mouse.cs
- CodeEntryPointMethod.cs
- DefaultParameterValueAttribute.cs
- SqlCacheDependencyDatabase.cs
- DecimalKeyFrameCollection.cs
- OracleDateTime.cs
- InternalDispatchObject.cs
- LambdaCompiler.Binary.cs
- TdsValueSetter.cs
- DocumentViewerConstants.cs
- Slider.cs
- SafeNativeMethods.cs
- ToolStripProgressBar.cs
- BitStream.cs
- CodeObject.cs
- VerificationException.cs
- XmlNotation.cs
- StandardToolWindows.cs
- InputEventArgs.cs
- wgx_sdk_version.cs
- FixedElement.cs