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
- XPathItem.cs
- ProxyElement.cs
- GridViewRowPresenterBase.cs
- TypeToTreeConverter.cs
- CroppedBitmap.cs
- NullEntityWrapper.cs
- Stroke2.cs
- ClientBuildManagerCallback.cs
- ToolBar.cs
- SafeNativeMethods.cs
- Effect.cs
- MergeEnumerator.cs
- TextElement.cs
- OperationPickerDialog.designer.cs
- Lease.cs
- Quaternion.cs
- SpinWait.cs
- TextFindEngine.cs
- WindowsTreeView.cs
- BaseResourcesBuildProvider.cs
- ArrayElementGridEntry.cs
- CLSCompliantAttribute.cs
- ColorContext.cs
- BitmapEffectGroup.cs
- KeyInstance.cs
- HashAlgorithm.cs
- WaitHandleCannotBeOpenedException.cs
- Geometry.cs
- StylusPoint.cs
- SafeBitVector32.cs
- Error.cs
- FieldToken.cs
- DataListItemEventArgs.cs
- SingleKeyFrameCollection.cs
- BindingFormattingDialog.cs
- HuffModule.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- HttpCacheParams.cs
- SqlDuplicator.cs
- SafeTimerHandle.cs
- LineUtil.cs
- FloatAverageAggregationOperator.cs
- RuntimeTrackingProfile.cs
- TableSectionStyle.cs
- BufferedWebEventProvider.cs
- InvalidDataContractException.cs
- SoapHelper.cs
- EvidenceBase.cs
- IntSecurity.cs
- ProjectedSlot.cs
- SvcMapFileLoader.cs
- ButtonField.cs
- CreatingCookieEventArgs.cs
- Image.cs
- SqlTransaction.cs
- DateTimeOffset.cs
- ToolStripSplitButton.cs
- QilCloneVisitor.cs
- _NetworkingPerfCounters.cs
- OleDbConnectionInternal.cs
- SharingService.cs
- JapaneseCalendar.cs
- ExternalFile.cs
- ConfigXmlText.cs
- RuntimeWrappedException.cs
- DesignerMetadata.cs
- PageThemeParser.cs
- DataGridBeginningEditEventArgs.cs
- DeclarativeCatalogPartDesigner.cs
- PageFunction.cs
- ValidatingPropertiesEventArgs.cs
- LinqToSqlWrapper.cs
- TypeReference.cs
- AuthenticationSection.cs
- RoutedEventHandlerInfo.cs
- RegisteredHiddenField.cs
- CheckBox.cs
- Cloud.cs
- AppDomainFactory.cs
- BStrWrapper.cs
- CollectionViewSource.cs
- DigestTraceRecordHelper.cs
- CheckBoxAutomationPeer.cs
- ProtocolViolationException.cs
- ImageAutomationPeer.cs
- SchemaNames.cs
- RichTextBoxAutomationPeer.cs
- PseudoWebRequest.cs
- MetafileHeaderWmf.cs
- DataServiceQuery.cs
- ConnectorRouter.cs
- OperationFormatUse.cs
- SpeakInfo.cs
- LinkTarget.cs
- InheritedPropertyChangedEventArgs.cs
- _FixedSizeReader.cs
- RC2.cs
- TableMethodGenerator.cs
- HtmlInputImage.cs
- IPCCacheManager.cs