Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Sys / System / Configuration / SingleTagSectionHandler.cs / 1 / 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
- XPathNodeIterator.cs
- ConstraintCollection.cs
- ReadOnlyDictionary.cs
- ServerIdentity.cs
- SqlDataSource.cs
- AcceleratedTokenProviderState.cs
- Relationship.cs
- PropertyGridEditorPart.cs
- VsPropertyGrid.cs
- Sequence.cs
- BitmapEffectCollection.cs
- RawKeyboardInputReport.cs
- TransformConverter.cs
- MethodCallConverter.cs
- XmlDataSourceView.cs
- PersistenceParticipant.cs
- Size3DConverter.cs
- DeploymentSectionCache.cs
- Listener.cs
- BaseCollection.cs
- DataSourceGeneratorException.cs
- EdgeModeValidation.cs
- UseLicense.cs
- SerializationSectionGroup.cs
- GridViewColumn.cs
- NamedPermissionSet.cs
- GreenMethods.cs
- MD5Cng.cs
- PropertyPushdownHelper.cs
- SystemColorTracker.cs
- AnnouncementDispatcherAsyncResult.cs
- ContentElementAutomationPeer.cs
- ObjectToken.cs
- TableCell.cs
- KerberosRequestorSecurityTokenAuthenticator.cs
- XmlTypeMapping.cs
- DesignerActionUI.cs
- CurrencyManager.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- TextServicesDisplayAttribute.cs
- Subtree.cs
- ProgressBar.cs
- XmlNavigatorFilter.cs
- ToolboxComponentsCreatedEventArgs.cs
- ApplicationServicesHostFactory.cs
- RsaSecurityTokenParameters.cs
- BaseTemplateCodeDomTreeGenerator.cs
- ElementNotAvailableException.cs
- TypeDelegator.cs
- IntranetCredentialPolicy.cs
- PageRouteHandler.cs
- XamlSerializerUtil.cs
- MembershipUser.cs
- WindowsFormsHost.cs
- HttpStaticObjectsCollectionWrapper.cs
- ResourceReader.cs
- RefType.cs
- PathGeometry.cs
- GradientPanel.cs
- ListViewGroupItemCollection.cs
- CodeCompiler.cs
- DictionaryGlobals.cs
- Animatable.cs
- StrongNameKeyPair.cs
- SiteMapPath.cs
- InputLangChangeRequestEvent.cs
- SqlDataSourceRefreshSchemaForm.cs
- HierarchicalDataSourceControl.cs
- CleanUpVirtualizedItemEventArgs.cs
- SecurityCriticalDataForSet.cs
- SelectionBorderGlyph.cs
- ObjectTag.cs
- XmlQueryTypeFactory.cs
- ObjectListFieldCollection.cs
- TraversalRequest.cs
- PersistenceException.cs
- DESCryptoServiceProvider.cs
- TreeChangeInfo.cs
- GeneralTransform2DTo3DTo2D.cs
- UiaCoreTypesApi.cs
- QuotaThrottle.cs
- TriggerBase.cs
- ScriptControl.cs
- DateTimeConstantAttribute.cs
- HostAdapter.cs
- DropShadowEffect.cs
- ConfigXmlSignificantWhitespace.cs
- BaseConfigurationRecord.cs
- ContentFileHelper.cs
- EntityContainer.cs
- ToolStripDropDown.cs
- BinaryUtilClasses.cs
- SettingsPropertyNotFoundException.cs
- WsatServiceAddress.cs
- Thread.cs
- RootNamespaceAttribute.cs
- OverrideMode.cs
- ColumnCollection.cs
- DelegatingTypeDescriptionProvider.cs
- WorkflowApplicationUnloadedException.cs