Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Sys / System / Configuration / SingleTagSectionHandler.cs / 1305376 / SingleTagSectionHandler.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Configuration { using System.Collections; using System.Xml; /** * Single-tag dictionary config factory * * Use for tags of the form:*/ /// /// public class SingleTagSectionHandler : IConfigurationSectionHandler { /** * Create * * Given a partially composed config object (possibly null) * and some input from the config system, return a * further partially composed config object */ ////// public virtual object Create(Object parent, Object context, XmlNode section) { Hashtable result; // start result off as a shallow clone of the parent if (parent == null) result = new Hashtable(); else result = new Hashtable((IDictionary)parent); // verify that there are no children HandlerBase.CheckForChildNodes(section); // iterate through each XML section in order and apply the directives foreach (XmlAttribute attribute in section.Attributes) { // handle name-value pairs result[attribute.Name] = attribute.Value; } return result; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //[To be supplied.] ///// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Configuration { using System.Collections; using System.Xml; /** * Single-tag dictionary config factory * * Use for tags of the form:*/ /// /// public class SingleTagSectionHandler : IConfigurationSectionHandler { /** * Create * * Given a partially composed config object (possibly null) * and some input from the config system, return a * further partially composed config object */ ////// public virtual object Create(Object parent, Object context, XmlNode section) { Hashtable result; // start result off as a shallow clone of the parent if (parent == null) result = new Hashtable(); else result = new Hashtable((IDictionary)parent); // verify that there are no children HandlerBase.CheckForChildNodes(section); // iterate through each XML section in order and apply the directives foreach (XmlAttribute attribute in section.Attributes) { // handle name-value pairs result[attribute.Name] = attribute.Value; } return result; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.[To be supplied.] ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WindowsScrollBarBits.cs
- WebSysDescriptionAttribute.cs
- FontStretchConverter.cs
- AppModelKnownContentFactory.cs
- RotateTransform.cs
- dbdatarecord.cs
- InternalEnumValidatorAttribute.cs
- RotateTransform3D.cs
- WebControlAdapter.cs
- Int16Storage.cs
- UserNameSecurityTokenAuthenticator.cs
- InternalBufferManager.cs
- XPathEmptyIterator.cs
- ClientConfigurationHost.cs
- Composition.cs
- ObjectPersistData.cs
- PeerNeighborManager.cs
- PathSegmentCollection.cs
- LineGeometry.cs
- MobileListItem.cs
- AsyncOperationManager.cs
- ExpressionBuilderContext.cs
- LineInfo.cs
- QualifierSet.cs
- LambdaSerializationException.cs
- InstanceCreationEditor.cs
- Popup.cs
- AmbiguousMatchException.cs
- PaintEvent.cs
- HttpCacheVary.cs
- FileSystemWatcher.cs
- MailWebEventProvider.cs
- DispatcherTimer.cs
- ZipQueryOperator.cs
- DataControlLinkButton.cs
- HashCodeCombiner.cs
- SHA1CryptoServiceProvider.cs
- HtmlImage.cs
- IconHelper.cs
- FileReader.cs
- EmbeddedMailObject.cs
- SoapExtensionImporter.cs
- CookielessHelper.cs
- UICuesEvent.cs
- ControlUtil.cs
- DynamicQueryableWrapper.cs
- _TLSstream.cs
- WindowsTooltip.cs
- CharacterShapingProperties.cs
- DbException.cs
- UniqueConstraint.cs
- ServiceProviders.cs
- _SpnDictionary.cs
- LoadWorkflowByInstanceKeyCommand.cs
- ScriptingProfileServiceSection.cs
- AQNBuilder.cs
- ObjectIDGenerator.cs
- DictionaryKeyPropertyAttribute.cs
- TimeSpanValidatorAttribute.cs
- SymbolPair.cs
- UniqueIdentifierService.cs
- ResourceAttributes.cs
- SqlConnectionHelper.cs
- DateTimeFormatInfoScanner.cs
- PatternMatcher.cs
- ActivityCodeDomSerializer.cs
- CompiledQuery.cs
- Substitution.cs
- DummyDataSource.cs
- ControlBuilder.cs
- SequentialActivityDesigner.cs
- ExternalException.cs
- DataControlCommands.cs
- SqlServer2KCompatibilityAnnotation.cs
- RegexWriter.cs
- ElementUtil.cs
- DefaultPropertyAttribute.cs
- ModelTreeEnumerator.cs
- CustomErrorCollection.cs
- Int64.cs
- TranslateTransform.cs
- _ServiceNameStore.cs
- XhtmlBasicObjectListAdapter.cs
- Parser.cs
- WorkflowApplicationException.cs
- XPathEmptyIterator.cs
- FieldToken.cs
- QilList.cs
- XmlWriterSettings.cs
- TdsParserSafeHandles.cs
- XmlChildEnumerator.cs
- HostedImpersonationContext.cs
- AttributeCollection.cs
- EventLogWatcher.cs
- GridViewColumnCollectionChangedEventArgs.cs
- VirtualPathUtility.cs
- TreeViewCancelEvent.cs
- UserControlBuildProvider.cs
- SetIterators.cs
- SqlTopReducer.cs