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
- StrokeCollection2.cs
- DesignerForm.cs
- IISMapPath.cs
- ExpressionHelper.cs
- CompressEmulationStream.cs
- DataGridViewCell.cs
- EventLogRecord.cs
- LogAppendAsyncResult.cs
- RectValueSerializer.cs
- PermissionSetEnumerator.cs
- BufferModeSettings.cs
- _NegoState.cs
- BuildDependencySet.cs
- NullableDecimalSumAggregationOperator.cs
- Semaphore.cs
- FederatedMessageSecurityOverHttp.cs
- SiteMap.cs
- BitmapImage.cs
- SoapEnumAttribute.cs
- WebPartManager.cs
- TextUtf8RawTextWriter.cs
- URLString.cs
- querybuilder.cs
- DataGridViewDataErrorEventArgs.cs
- ServiceMemoryGates.cs
- DeleteIndexBinder.cs
- SystemIPv4InterfaceProperties.cs
- DataReaderContainer.cs
- Table.cs
- X509Certificate2Collection.cs
- QueryRelOp.cs
- ClipboardProcessor.cs
- GetIsBrowserClientRequest.cs
- TemplatedControlDesigner.cs
- PackagingUtilities.cs
- SystemIPv6InterfaceProperties.cs
- NodeLabelEditEvent.cs
- DeclaredTypeElementCollection.cs
- MetadataArtifactLoaderCompositeResource.cs
- DataGridPagerStyle.cs
- ImageListStreamer.cs
- FilteredDataSetHelper.cs
- NamespaceInfo.cs
- SystemIPv6InterfaceProperties.cs
- ErrorEventArgs.cs
- ElementHost.cs
- EntityDataSourceView.cs
- oledbmetadatacollectionnames.cs
- SQLUtility.cs
- StreamReader.cs
- Base64Encoding.cs
- WmlLinkAdapter.cs
- AdapterDictionary.cs
- ToolStripScrollButton.cs
- ListViewItemEventArgs.cs
- SafeReadContext.cs
- RequestTimeoutManager.cs
- ResourcePool.cs
- SessionIDManager.cs
- FileCodeGroup.cs
- SelectionHighlightInfo.cs
- ComboBox.cs
- SyntaxCheck.cs
- BitmapEffectState.cs
- SqlCacheDependencyDatabaseCollection.cs
- ListViewInsertedEventArgs.cs
- CompositionDesigner.cs
- RoutedEventValueSerializer.cs
- ApplicationDirectory.cs
- PhysicalOps.cs
- _ListenerAsyncResult.cs
- WebColorConverter.cs
- MachineKeySection.cs
- NTAccount.cs
- ProcessThreadCollection.cs
- X509Certificate2.cs
- HScrollProperties.cs
- SqlClientMetaDataCollectionNames.cs
- PersonalizationAdministration.cs
- ColumnResizeAdorner.cs
- TextBoxAutoCompleteSourceConverter.cs
- SiteMapPath.cs
- FormViewInsertEventArgs.cs
- CustomCredentialPolicy.cs
- ScriptingScriptResourceHandlerSection.cs
- InputScope.cs
- XmlConvert.cs
- XmlSerializerFormatAttribute.cs
- EntitySqlQueryCacheEntry.cs
- FunctionImportMapping.ReturnTypeRenameMapping.cs
- ExternalFile.cs
- RegexMatchCollection.cs
- MexNamedPipeBindingCollectionElement.cs
- ThousandthOfEmRealPoints.cs
- _SingleItemRequestCache.cs
- ByteStack.cs
- QualifiedCellIdBoolean.cs
- Matrix3D.cs
- WindowsComboBox.cs
- StyleCollection.cs