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
- RequestBringIntoViewEventArgs.cs
- SqlDataSourceConnectionPanel.cs
- filewebrequest.cs
- TimeSpanStorage.cs
- PlatformNotSupportedException.cs
- TripleDES.cs
- ResponseStream.cs
- ColumnMap.cs
- EventLogger.cs
- TemplateControlParser.cs
- xmlsaver.cs
- AmbiguousMatchException.cs
- VariableQuery.cs
- TrustLevel.cs
- DBNull.cs
- ReliabilityContractAttribute.cs
- StickyNote.cs
- Transaction.cs
- IncrementalHitTester.cs
- NavigatingCancelEventArgs.cs
- XmlDataImplementation.cs
- DeploymentSection.cs
- MultiSelectRootGridEntry.cs
- sqlser.cs
- Polygon.cs
- Switch.cs
- StringUtil.cs
- TemplateBaseAction.cs
- ContextMenu.cs
- Cell.cs
- TdsValueSetter.cs
- ConstraintStruct.cs
- ControlPersister.cs
- ColorAnimation.cs
- SelectManyQueryOperator.cs
- _Semaphore.cs
- Main.cs
- Rect3DValueSerializer.cs
- ValidationRuleCollection.cs
- ListViewItemMouseHoverEvent.cs
- AssemblySettingAttributes.cs
- PrimitiveSchema.cs
- Internal.cs
- DispatchChannelSink.cs
- WorkflowServiceHost.cs
- UnsafeNativeMethodsTablet.cs
- DBPropSet.cs
- BulletedList.cs
- TableLayoutPanelResizeGlyph.cs
- BitmapFrameDecode.cs
- parserscommon.cs
- X509Extension.cs
- sqlmetadatafactory.cs
- URLString.cs
- SqlConnectionHelper.cs
- ListSurrogate.cs
- SafeArrayTypeMismatchException.cs
- OrderedDictionary.cs
- SEHException.cs
- ActivityCollectionMarkupSerializer.cs
- GatewayIPAddressInformationCollection.cs
- SafeTokenHandle.cs
- TextSelection.cs
- OracleConnection.cs
- LazyInitializer.cs
- DataTableReaderListener.cs
- ClientProxyGenerator.cs
- Model3DGroup.cs
- ProcessModuleDesigner.cs
- TypeUsage.cs
- securitycriticaldata.cs
- SQLBytesStorage.cs
- ObjectHandle.cs
- LogStore.cs
- NamespaceInfo.cs
- XdrBuilder.cs
- Decimal.cs
- OpenFileDialog.cs
- ChannelSinkStacks.cs
- SuppressIldasmAttribute.cs
- wgx_exports.cs
- Viewport3DAutomationPeer.cs
- ValidationSummary.cs
- DataGridRow.cs
- DataGridViewMethods.cs
- InteropBitmapSource.cs
- TimelineClockCollection.cs
- MouseActionValueSerializer.cs
- MsmqMessage.cs
- X509CertificateEndpointIdentity.cs
- SplineQuaternionKeyFrame.cs
- CodeDirectoryCompiler.cs
- MembershipValidatePasswordEventArgs.cs
- XmlName.cs
- ParenthesizePropertyNameAttribute.cs
- RoutedUICommand.cs
- DataFormats.cs
- PlainXmlWriter.cs
- TagMapInfo.cs
- XmlBinaryReader.cs