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
- HttpCookieCollection.cs
- NetworkCredential.cs
- GridViewColumnHeader.cs
- DesignSurfaceServiceContainer.cs
- Image.cs
- GroupStyle.cs
- DataSourceXmlAttributeAttribute.cs
- TargetException.cs
- ConnectivityStatus.cs
- SqlConnectionHelper.cs
- GroupBox.cs
- XmlArrayItemAttribute.cs
- InternalTypeHelper.cs
- XmlSchemaParticle.cs
- ResXBuildProvider.cs
- RefExpr.cs
- FileChangesMonitor.cs
- Convert.cs
- RowToFieldTransformer.cs
- DiscreteKeyFrames.cs
- RequestQueryParser.cs
- FlowDecision.cs
- GridViewSelectEventArgs.cs
- FixedDocument.cs
- CommentEmitter.cs
- ReadOnlyCollection.cs
- ModifierKeysValueSerializer.cs
- ClickablePoint.cs
- DrawToolTipEventArgs.cs
- CustomCategoryAttribute.cs
- ZipIOExtraField.cs
- ToolboxCategoryItems.cs
- ClearCollection.cs
- FixedSOMTableCell.cs
- SourceElementsCollection.cs
- TextShapeableCharacters.cs
- ImageListStreamer.cs
- validationstate.cs
- IndicCharClassifier.cs
- BlurBitmapEffect.cs
- OdbcException.cs
- Point3DConverter.cs
- SetStoryboardSpeedRatio.cs
- CodeAssignStatement.cs
- RuleDefinitions.cs
- RSAProtectedConfigurationProvider.cs
- CultureMapper.cs
- formatter.cs
- ContextMenuService.cs
- FirstMatchCodeGroup.cs
- _ListenerAsyncResult.cs
- XmlDataDocument.cs
- NativeMethods.cs
- InputElement.cs
- AddInPipelineAttributes.cs
- StringWriter.cs
- ExpressionParser.cs
- EventMappingSettingsCollection.cs
- SqlCommandBuilder.cs
- FacetChecker.cs
- Cast.cs
- SqlSelectClauseBuilder.cs
- MaskPropertyEditor.cs
- ToolStripItemImageRenderEventArgs.cs
- DragDrop.cs
- RenderingBiasValidation.cs
- VectorConverter.cs
- AppDomainProtocolHandler.cs
- TextProperties.cs
- wgx_sdk_version.cs
- EditorPartChrome.cs
- Message.cs
- ConstrainedDataObject.cs
- FlowNode.cs
- DataGridViewRowCollection.cs
- WebBrowserNavigatingEventHandler.cs
- HttpCookieCollection.cs
- RIPEMD160Managed.cs
- TTSVoice.cs
- Misc.cs
- DesignerImageAdapter.cs
- EmptyEnumerable.cs
- MultiDataTrigger.cs
- StringSource.cs
- RangeValuePattern.cs
- DockPatternIdentifiers.cs
- GridView.cs
- ParentQuery.cs
- LocalFileSettingsProvider.cs
- HostTimeoutsElement.cs
- DataGridViewComboBoxCell.cs
- Ref.cs
- XmlDataDocument.cs
- BoundColumn.cs
- CapabilitiesState.cs
- TextSpanModifier.cs
- ControlPaint.cs
- HandledEventArgs.cs
- NameValuePair.cs
- TextContainerHelper.cs