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
- DataGridViewCellMouseEventArgs.cs
- SqlMethodTransformer.cs
- TextBox.cs
- ObjectItemCollection.cs
- ExpandSegment.cs
- InputScopeConverter.cs
- AttachedPropertyMethodSelector.cs
- FigureParaClient.cs
- DataRowView.cs
- RectConverter.cs
- XsltLibrary.cs
- GenericTypeParameterBuilder.cs
- SmtpSection.cs
- PointCollectionValueSerializer.cs
- KoreanLunisolarCalendar.cs
- TemplatedWizardStep.cs
- SizeF.cs
- BuildDependencySet.cs
- DocumentReference.cs
- mactripleDES.cs
- COM2EnumConverter.cs
- DataKey.cs
- SystemColorTracker.cs
- CurrencyManager.cs
- FunctionParameter.cs
- GetPageNumberCompletedEventArgs.cs
- Page.cs
- MLangCodePageEncoding.cs
- AnnotationStore.cs
- Double.cs
- ZipFileInfo.cs
- MetabaseReader.cs
- DataSourceGroupCollection.cs
- DrawingImage.cs
- TrackBarDesigner.cs
- ControlAdapter.cs
- SafeHandles.cs
- DelegateSerializationHolder.cs
- DropSource.cs
- OracleLob.cs
- StorageComplexPropertyMapping.cs
- FusionWrap.cs
- XsltLibrary.cs
- Helpers.cs
- DiscoveryDocumentLinksPattern.cs
- UrlMappingCollection.cs
- DataGridViewColumnConverter.cs
- UserControlParser.cs
- TiffBitmapEncoder.cs
- CalendarDataBindingHandler.cs
- Stylesheet.cs
- GenericWebPart.cs
- SqlVisitor.cs
- MetadataArtifactLoaderFile.cs
- CodeGotoStatement.cs
- StrokeNode.cs
- AuthenticateEventArgs.cs
- WebPartTransformerCollection.cs
- WebHttpElement.cs
- AnimationException.cs
- AxHost.cs
- ApplicationSecurityManager.cs
- InheritedPropertyChangedEventArgs.cs
- UrlMappingsModule.cs
- ContractMapping.cs
- PropertyToken.cs
- XmlMembersMapping.cs
- _LoggingObject.cs
- ScriptingProfileServiceSection.cs
- PrivateFontCollection.cs
- SrgsGrammarCompiler.cs
- PassportAuthenticationEventArgs.cs
- ShutDownListener.cs
- DbSourceCommand.cs
- KeyValuePair.cs
- RepeatButton.cs
- DataGrid.cs
- SemaphoreFullException.cs
- LineMetrics.cs
- TextSelectionHelper.cs
- KernelTypeValidation.cs
- RenameRuleObjectDialog.cs
- EntityDataSourceConfigureObjectContext.cs
- SeekStoryboard.cs
- RenderingBiasValidation.cs
- SafeNativeMethods.cs
- RunInstallerAttribute.cs
- XmlReflectionMember.cs
- SQLGuidStorage.cs
- ListViewDeleteEventArgs.cs
- RadioButtonPopupAdapter.cs
- _AutoWebProxyScriptEngine.cs
- CannotUnloadAppDomainException.cs
- EventKeyword.cs
- KeySpline.cs
- Image.cs
- SqlDataSourceCommandEventArgs.cs
- PrintingPermission.cs
- Win32Native.cs
- XPathQilFactory.cs