Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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
*/
///
/// [To be supplied.]
///
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;
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TreeNodeConverter.cs
- BuildResult.cs
- ExpandSegmentCollection.cs
- RowSpanVector.cs
- ValueConversionAttribute.cs
- CustomTypeDescriptor.cs
- DbSource.cs
- MemberProjectedSlot.cs
- ValidationManager.cs
- BrushConverter.cs
- ListParaClient.cs
- ObjectSpanRewriter.cs
- LogExtentCollection.cs
- DataGridViewToolTip.cs
- PublisherMembershipCondition.cs
- PageThemeCodeDomTreeGenerator.cs
- DockPattern.cs
- coordinator.cs
- ClientBuildManagerCallback.cs
- ListViewItemMouseHoverEvent.cs
- StreamReader.cs
- PropertyGroupDescription.cs
- SplitterCancelEvent.cs
- ScriptReferenceBase.cs
- ResourceContainer.cs
- ParallelForEach.cs
- LayoutEditorPart.cs
- XPathExpr.cs
- Label.cs
- XamlDesignerSerializationManager.cs
- SmtpFailedRecipientException.cs
- HttpWebResponse.cs
- HtmlMeta.cs
- DESCryptoServiceProvider.cs
- TextTreeInsertUndoUnit.cs
- SectionVisual.cs
- PasswordBox.cs
- ProxyDataContractResolver.cs
- InputBindingCollection.cs
- GenericTransactionFlowAttribute.cs
- Image.cs
- FileReservationCollection.cs
- DependencyPropertyChangedEventArgs.cs
- XmlQualifiedName.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- ShellProvider.cs
- FragmentQueryKB.cs
- TypedTableGenerator.cs
- PointLight.cs
- Part.cs
- DataBoundControlHelper.cs
- RenderData.cs
- XmlSignatureManifest.cs
- HijriCalendar.cs
- Splitter.cs
- SmtpFailedRecipientException.cs
- TypographyProperties.cs
- GridView.cs
- RijndaelManaged.cs
- DataTableExtensions.cs
- Keywords.cs
- HeaderUtility.cs
- TextEditor.cs
- WeakReference.cs
- XPathDescendantIterator.cs
- RbTree.cs
- AppLevelCompilationSectionCache.cs
- FrameDimension.cs
- InkCanvas.cs
- ValidatingPropertiesEventArgs.cs
- GPPOINT.cs
- EntityDataSourceContainerNameItem.cs
- RSAPKCS1KeyExchangeFormatter.cs
- DataPagerField.cs
- BoolExpr.cs
- ValueProviderWrapper.cs
- ThemeDirectoryCompiler.cs
- JsonServiceDocumentSerializer.cs
- CrossAppDomainChannel.cs
- ScrollViewer.cs
- InvalidEnumArgumentException.cs
- TemplateBamlRecordReader.cs
- SQLInt32Storage.cs
- Assembly.cs
- TemplateBamlRecordReader.cs
- WorkflowMarkupSerializationProvider.cs
- Timer.cs
- DataFormats.cs
- WebPartConnectVerb.cs
- ExpressionBuilderCollection.cs
- IProvider.cs
- lengthconverter.cs
- SqlBulkCopyColumnMappingCollection.cs
- EditingCommands.cs
- DateTimeSerializationSection.cs
- XmlSchemaSimpleTypeUnion.cs
- GroupStyle.cs
- SplayTreeNode.cs
- ZoneButton.cs
- EventHandlersStore.cs