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
- HttpInputStream.cs
- XmlMapping.cs
- AddToCollection.cs
- DataColumnMapping.cs
- SessionPageStatePersister.cs
- SplitContainer.cs
- IgnoreFileBuildProvider.cs
- SchemaEntity.cs
- SettingsAttributeDictionary.cs
- _SSPISessionCache.cs
- GroupDescription.cs
- sqlstateclientmanager.cs
- DispatchWrapper.cs
- WindowPatternIdentifiers.cs
- Win32.cs
- Maps.cs
- ImpersonateTokenRef.cs
- WinEventQueueItem.cs
- ElementAction.cs
- DbConnectionPoolCounters.cs
- ThreadAttributes.cs
- CodeTypeDelegate.cs
- MutexSecurity.cs
- XmlHelper.cs
- MemberAccessException.cs
- WindowsStartMenu.cs
- pingexception.cs
- XmlImplementation.cs
- _PooledStream.cs
- BufferedReceiveElement.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- HwndTarget.cs
- PersonalizationStateInfoCollection.cs
- Token.cs
- ExpressionPrinter.cs
- SystemIcons.cs
- ContentPosition.cs
- OutputCacheProfile.cs
- MexBindingElement.cs
- Filter.cs
- StylesEditorDialog.cs
- PixelFormat.cs
- BooleanAnimationUsingKeyFrames.cs
- DataGridColumnReorderingEventArgs.cs
- View.cs
- LinqDataSourceView.cs
- StructuralObject.cs
- CollectionBuilder.cs
- HtmlButton.cs
- ResolveNameEventArgs.cs
- DataGridViewColumnHeaderCell.cs
- PrivateFontCollection.cs
- IdnMapping.cs
- PriorityQueue.cs
- InvalidDataContractException.cs
- OleStrCAMarshaler.cs
- Classification.cs
- PersistenceException.cs
- Tuple.cs
- OpenFileDialog.cs
- Style.cs
- Utility.cs
- AttributeUsageAttribute.cs
- CqlParserHelpers.cs
- ScrollContentPresenter.cs
- BindMarkupExtensionSerializer.cs
- HttpMethodAttribute.cs
- BindingBase.cs
- CheckBoxRenderer.cs
- XPathEmptyIterator.cs
- DetailsViewUpdateEventArgs.cs
- FrugalList.cs
- SpecularMaterial.cs
- MemberHolder.cs
- BindingManagerDataErrorEventArgs.cs
- panel.cs
- CompensatableTransactionScopeActivity.cs
- ResourceReferenceExpressionConverter.cs
- ToggleProviderWrapper.cs
- CapabilitiesSection.cs
- TextRangeSerialization.cs
- CompoundFileDeflateTransform.cs
- NetworkInterface.cs
- EntryWrittenEventArgs.cs
- TickBar.cs
- ConfigurationProperty.cs
- SequenceQuery.cs
- UIElementCollection.cs
- PackageRelationship.cs
- Drawing.cs
- ColumnBinding.cs
- ScriptControl.cs
- TableTextElementCollectionInternal.cs
- DbMetaDataCollectionNames.cs
- TableHeaderCell.cs
- DataServiceRequestOfT.cs
- FontStyle.cs
- ElementAtQueryOperator.cs
- CodeDelegateCreateExpression.cs
- HelpFileFileNameEditor.cs