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
- LicenseProviderAttribute.cs
- GeneralTransformGroup.cs
- ApplicationTrust.cs
- SqlErrorCollection.cs
- Rfc4050KeyFormatter.cs
- InteropAutomationProvider.cs
- HttpContext.cs
- ScrollViewer.cs
- ResourceExpressionBuilder.cs
- Vector.cs
- NetDataContractSerializer.cs
- RecordManager.cs
- Border.cs
- SafeCryptoHandles.cs
- ObfuscateAssemblyAttribute.cs
- DesignerActionUIService.cs
- CategoryEditor.cs
- ComponentConverter.cs
- OutputCacheSettingsSection.cs
- MailMessage.cs
- DataSourceGeneratorException.cs
- InputDevice.cs
- SafeNativeMethods.cs
- IntPtr.cs
- WaitHandleCannotBeOpenedException.cs
- ObjectViewQueryResultData.cs
- BindingContext.cs
- SoapEnumAttribute.cs
- ObservableDictionary.cs
- TextEditor.cs
- ProcessHostConfigUtils.cs
- TableStyle.cs
- ALinqExpressionVisitor.cs
- SerializationEventsCache.cs
- ProfileService.cs
- HuffModule.cs
- RoleManagerModule.cs
- ToggleButtonAutomationPeer.cs
- StringKeyFrameCollection.cs
- ChannelServices.cs
- XmlDataSourceDesigner.cs
- TdsParserStaticMethods.cs
- CustomAttributeFormatException.cs
- CodeCompileUnit.cs
- TransactionFilter.cs
- TypedTableBase.cs
- ScriptIgnoreAttribute.cs
- SelectionProviderWrapper.cs
- QuadraticBezierSegment.cs
- EditingMode.cs
- MessagePropertyDescription.cs
- Utils.cs
- DrawingContextDrawingContextWalker.cs
- RoutedUICommand.cs
- CompiledRegexRunnerFactory.cs
- RtfFormatStack.cs
- NativeMethods.cs
- ArraySet.cs
- ControlParameter.cs
- WsdlBuildProvider.cs
- MemberRelationshipService.cs
- FamilyTypeface.cs
- AndCondition.cs
- OverflowException.cs
- MonikerUtility.cs
- PointKeyFrameCollection.cs
- RuntimeConfig.cs
- XmlArrayItemAttributes.cs
- CachedBitmap.cs
- FillErrorEventArgs.cs
- ToolStripEditorManager.cs
- AnnotationStore.cs
- WizardPanelChangingEventArgs.cs
- ProjectionPath.cs
- ToolStripDropDownButton.cs
- AsymmetricAlgorithm.cs
- NominalTypeEliminator.cs
- ForEachDesigner.xaml.cs
- ToolZone.cs
- HighlightComponent.cs
- Handle.cs
- EnumValAlphaComparer.cs
- Int64Animation.cs
- QuaternionRotation3D.cs
- HwndSource.cs
- CharacterBufferReference.cs
- ChangeTracker.cs
- SweepDirectionValidation.cs
- DataService.cs
- WebPartRestoreVerb.cs
- SchemaElement.cs
- safemediahandle.cs
- URLString.cs
- ContentPresenter.cs
- BitmapMetadata.cs
- PreservationFileReader.cs
- BoolExpr.cs
- SiteMapDataSource.cs
- KnownTypesProvider.cs
- CriticalFinalizerObject.cs