Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- MarkupExtensionSerializer.cs
- ColorInterpolationModeValidation.cs
- HtmlForm.cs
- SimplePropertyEntry.cs
- CollectionViewSource.cs
- ConnectionStringSettingsCollection.cs
- StylusPointPropertyId.cs
- BulletedList.cs
- DescendantQuery.cs
- GeneralTransform3D.cs
- DocumentPageView.cs
- GlobalizationSection.cs
- SQLBoolean.cs
- WindowsScroll.cs
- D3DImage.cs
- UnwrappedTypesXmlSerializerManager.cs
- FieldToken.cs
- BuildProviderCollection.cs
- BaseParaClient.cs
- XmlIgnoreAttribute.cs
- AssemblyAssociatedContentFileAttribute.cs
- ColorInterpolationModeValidation.cs
- SecureStringHasher.cs
- AssemblyCollection.cs
- FormsAuthentication.cs
- ISessionStateStore.cs
- RegexRunner.cs
- DeflateEmulationStream.cs
- DiscreteKeyFrames.cs
- NativeMethods.cs
- TextBreakpoint.cs
- SqlMethodAttribute.cs
- ScrollBarRenderer.cs
- COMException.cs
- TextModifierScope.cs
- ResXDataNode.cs
- WindowsContainer.cs
- SmtpAuthenticationManager.cs
- SimpleWebHandlerParser.cs
- TextFormatterHost.cs
- CompilationLock.cs
- TrackingServices.cs
- SpeakProgressEventArgs.cs
- GPPOINT.cs
- Adorner.cs
- DataRelationPropertyDescriptor.cs
- ConstraintManager.cs
- XmlWriter.cs
- DataGridViewEditingControlShowingEventArgs.cs
- SafeFileMappingHandle.cs
- EdmFunctionAttribute.cs
- DPCustomTypeDescriptor.cs
- DocumentManager.cs
- IdSpace.cs
- RuleElement.cs
- QilFunction.cs
- ErrorWebPart.cs
- NetworkAddressChange.cs
- MobileFormsAuthentication.cs
- SizeAnimationBase.cs
- ObjectDataSourceSelectingEventArgs.cs
- IgnoreDataMemberAttribute.cs
- SqlGenerator.cs
- BinaryMethodMessage.cs
- WsdlWriter.cs
- TdsParserSafeHandles.cs
- StackSpiller.cs
- SafePEFileHandle.cs
- Divide.cs
- NonSerializedAttribute.cs
- UpdatePanelControlTrigger.cs
- Content.cs
- DoubleConverter.cs
- MissingManifestResourceException.cs
- FormViewUpdateEventArgs.cs
- StringComparer.cs
- TableItemStyle.cs
- ExpressionBuilder.cs
- TableParagraph.cs
- ThreadInterruptedException.cs
- StandardCommands.cs
- SortExpressionBuilder.cs
- DecoderNLS.cs
- NeutralResourcesLanguageAttribute.cs
- DispatcherTimer.cs
- behaviorssection.cs
- SqlClientWrapperSmiStreamChars.cs
- ServiceReference.cs
- TypedReference.cs
- HtmlTableRowCollection.cs
- PersianCalendar.cs
- ContainerControl.cs
- QilXmlReader.cs
- ValidationHelper.cs
- CollectionChangedEventManager.cs
- UICuesEvent.cs
- UnionCodeGroup.cs
- FileReader.cs
- Pkcs9Attribute.cs
- DbDeleteCommandTree.cs