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
- ViewBox.cs
- QueryStringConverter.cs
- List.cs
- DependencyPropertyChangedEventArgs.cs
- WebContext.cs
- TemplatedMailWebEventProvider.cs
- OleCmdHelper.cs
- Part.cs
- RegistryPermission.cs
- DropDownList.cs
- PathSegment.cs
- CodeConstructor.cs
- HtmlHead.cs
- BlockExpression.cs
- DataTableReaderListener.cs
- ServiceMoniker.cs
- ComponentManagerBroker.cs
- RelationshipEndMember.cs
- EncodingInfo.cs
- QilGenerator.cs
- Memoizer.cs
- AddInProcess.cs
- StreamedFramingRequestChannel.cs
- XmlSecureResolver.cs
- SecurityKeyIdentifierClause.cs
- TreeBuilderXamlTranslator.cs
- PageTheme.cs
- RectConverter.cs
- DataShape.cs
- XmlChildEnumerator.cs
- MergeFailedEvent.cs
- Int32CollectionValueSerializer.cs
- NamedPipeConnectionPool.cs
- ItemChangedEventArgs.cs
- CollectionEditorDialog.cs
- DataGridViewImageCell.cs
- CoordinationService.cs
- DataGridColumnDropSeparator.cs
- DesignOnlyAttribute.cs
- Pair.cs
- ContentType.cs
- TextElement.cs
- Int16Storage.cs
- TitleStyle.cs
- ExpressionVisitor.cs
- PageRequestManager.cs
- ProgressBar.cs
- CodeSnippetStatement.cs
- TaskExceptionHolder.cs
- NumberSubstitution.cs
- AlgoModule.cs
- DataObjectEventArgs.cs
- DependentTransaction.cs
- DataGridViewCellCancelEventArgs.cs
- SeekStoryboard.cs
- Operand.cs
- CapabilitiesRule.cs
- securitycriticaldataClass.cs
- InkCanvasInnerCanvas.cs
- TextBlockAutomationPeer.cs
- ValidationSummary.cs
- MessageSecurityOverMsmqElement.cs
- CaseExpr.cs
- LiteralControl.cs
- Rotation3DAnimationBase.cs
- WrappedReader.cs
- Registry.cs
- MdiWindowListItemConverter.cs
- RenderDataDrawingContext.cs
- CharEntityEncoderFallback.cs
- InputScopeManager.cs
- Inflater.cs
- ToolBar.cs
- ConnectionManagementElement.cs
- GeometryDrawing.cs
- DataSourceGeneratorException.cs
- PrintPreviewControl.cs
- __FastResourceComparer.cs
- BamlMapTable.cs
- CodePageEncoding.cs
- IgnoreSectionHandler.cs
- BindingGroup.cs
- SqlSelectStatement.cs
- DefaultTextStoreTextComposition.cs
- FormsAuthenticationTicket.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- XmlSignificantWhitespace.cs
- FreeFormPanel.cs
- DispatchWrapper.cs
- PropVariant.cs
- WriterOutput.cs
- StylusPointProperty.cs
- SqlVisitor.cs
- PlainXmlDeserializer.cs
- LinqDataSourceStatusEventArgs.cs
- SignerInfo.cs
- GridViewRowCollection.cs
- WindowsRichEditRange.cs
- DbModificationCommandTree.cs
- FunctionParameter.cs