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
- _OverlappedAsyncResult.cs
- SoapExtensionTypeElement.cs
- ScopelessEnumAttribute.cs
- FullTrustAssembly.cs
- Helpers.cs
- GridViewUpdatedEventArgs.cs
- SoapSchemaImporter.cs
- RefType.cs
- ClientScriptManagerWrapper.cs
- ResourceContainer.cs
- BuildResult.cs
- SharedStream.cs
- CardSpacePolicyElement.cs
- UserControlAutomationPeer.cs
- IPipelineRuntime.cs
- GreenMethods.cs
- HtmlProps.cs
- CalendarDesigner.cs
- SmiSettersStream.cs
- AuthenticateEventArgs.cs
- DecoderNLS.cs
- Label.cs
- DocumentSignatureManager.cs
- ColumnClickEvent.cs
- CFStream.cs
- IList.cs
- Animatable.cs
- Matrix.cs
- GeometryDrawing.cs
- BaseTypeViewSchema.cs
- EditorResources.cs
- RawTextInputReport.cs
- Interfaces.cs
- FormsAuthenticationUserCollection.cs
- PrintDialog.cs
- Bezier.cs
- PrinterResolution.cs
- DescendentsWalker.cs
- CodeCommentStatementCollection.cs
- GridViewUpdateEventArgs.cs
- DataViewListener.cs
- TreeNodeClickEventArgs.cs
- WebPartUserCapability.cs
- ElementHostPropertyMap.cs
- Typeface.cs
- UInt16.cs
- BinaryObjectInfo.cs
- TransformConverter.cs
- ControlCachePolicy.cs
- CheckBoxList.cs
- DataBindingExpressionBuilder.cs
- SessionPageStatePersister.cs
- ResolveMatches11.cs
- BitArray.cs
- XmlQueryCardinality.cs
- CheckedListBox.cs
- IPipelineRuntime.cs
- DialogWindow.cs
- LiteralControl.cs
- ObjectDataSource.cs
- IsolatedStorageException.cs
- MetadataPropertyvalue.cs
- DispatcherExceptionFilterEventArgs.cs
- TextCharacters.cs
- HtmlFormWrapper.cs
- CallbackWrapper.cs
- SimpleApplicationHost.cs
- AttributeUsageAttribute.cs
- AssemblyBuilder.cs
- TypeTypeConverter.cs
- SerializationSectionGroup.cs
- TableLayoutCellPaintEventArgs.cs
- CompoundFileStreamReference.cs
- _PooledStream.cs
- Typeface.cs
- XmlSchemaProviderAttribute.cs
- DesignDataSource.cs
- DataSourceHelper.cs
- FrameworkObject.cs
- ResolveCriteria11.cs
- CustomValidator.cs
- EventLogEntryCollection.cs
- LayeredChannelFactory.cs
- DynamicValueConverter.cs
- DropSource.cs
- PrintDocument.cs
- XmlArrayItemAttributes.cs
- AutoGeneratedField.cs
- NameNode.cs
- OracleParameter.cs
- TextTreeFixupNode.cs
- XmlDocumentType.cs
- OutputCache.cs
- UserPreferenceChangedEventArgs.cs
- TreeViewImageKeyConverter.cs
- SwitchElementsCollection.cs
- ChangePasswordAutoFormat.cs
- RelationshipEntry.cs
- TextDecorationCollectionConverter.cs
- SimpleApplicationHost.cs