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
- CodeTypeDelegate.cs
- ActivationServices.cs
- SqlDataSourceEnumerator.cs
- Dispatcher.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- SemanticBasicElement.cs
- Grammar.cs
- MLangCodePageEncoding.cs
- XmlQualifiedName.cs
- Knowncolors.cs
- CodeAccessPermission.cs
- XmlDataImplementation.cs
- ToolboxItem.cs
- BaseAddressPrefixFilterElementCollection.cs
- MultiBinding.cs
- DragDeltaEventArgs.cs
- _SSPIWrapper.cs
- StylusButton.cs
- HttpProfileGroupBase.cs
- FrameworkElement.cs
- TemplateComponentConnector.cs
- HtmlContainerControl.cs
- TextBoxAutoCompleteSourceConverter.cs
- StateInitialization.cs
- SqlDependency.cs
- ComPlusTypeLoader.cs
- CellNormalizer.cs
- BlobPersonalizationState.cs
- DriveInfo.cs
- Figure.cs
- EpmSourcePathSegment.cs
- AssociatedControlConverter.cs
- Currency.cs
- ZipIOExtraFieldElement.cs
- TemplatedControlDesigner.cs
- WSSecureConversationDec2005.cs
- Connector.xaml.cs
- ColorMap.cs
- ReflectionPermission.cs
- PagedDataSource.cs
- SamlAssertionKeyIdentifierClause.cs
- MetadataException.cs
- Utils.cs
- FixedMaxHeap.cs
- OdbcDataReader.cs
- DefaultValidator.cs
- LeaseManager.cs
- basevalidator.cs
- MetadataArtifactLoaderComposite.cs
- TagMapInfo.cs
- ControlCollection.cs
- ContentPresenter.cs
- NativeActivityContext.cs
- ZipIOExtraFieldPaddingElement.cs
- DataTableReaderListener.cs
- LinqTreeNodeEvaluator.cs
- AutomationElementCollection.cs
- TextEndOfParagraph.cs
- GCHandleCookieTable.cs
- VirtualDirectoryMapping.cs
- StaticResourceExtension.cs
- WinEventHandler.cs
- UiaCoreApi.cs
- IsolatedStorage.cs
- XmlSchemaAll.cs
- WindowsScrollBarBits.cs
- HierarchicalDataBoundControl.cs
- WorkflowRuntimeServiceElement.cs
- diagnosticsswitches.cs
- ListViewInsertEventArgs.cs
- ToolStripDropDownMenu.cs
- UnrecognizedPolicyAssertionElement.cs
- BehaviorEditorPart.cs
- AuthenticationModuleElementCollection.cs
- PriorityBindingExpression.cs
- ContextMenu.cs
- XmlSchemaObjectTable.cs
- ConditionalDesigner.cs
- DesignUtil.cs
- InfoCardSchemas.cs
- WebAdminConfigurationHelper.cs
- ChildTable.cs
- SchemaImporterExtensionElement.cs
- PropertyItem.cs
- DataGridViewRowEventArgs.cs
- ViewManager.cs
- RecognizerBase.cs
- EnumConverter.cs
- ToolStripStatusLabel.cs
- DateTimeEditor.cs
- CurrentChangingEventManager.cs
- DataGridViewImageCell.cs
- PolicyValidator.cs
- SystemDiagnosticsSection.cs
- GlyphRun.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- ConnectionPoolManager.cs
- ReflectPropertyDescriptor.cs
- WebPartCancelEventArgs.cs
- SQLBinaryStorage.cs