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
- DelegateBodyWriter.cs
- PtsCache.cs
- TriggerAction.cs
- SqlWriter.cs
- CodePrimitiveExpression.cs
- QueryOperatorEnumerator.cs
- LambdaCompiler.Generated.cs
- XmlNodeList.cs
- BamlResourceContent.cs
- XmlObjectSerializerReadContextComplexJson.cs
- ListViewEditEventArgs.cs
- DataGrid.cs
- mda.cs
- ModelTreeManager.cs
- RoleServiceManager.cs
- HttpClientProtocol.cs
- PageThemeBuildProvider.cs
- Win32MouseDevice.cs
- AtomMaterializerLog.cs
- PingReply.cs
- EmptyControlCollection.cs
- AsyncOperationContext.cs
- SecureEnvironment.cs
- SqlDependencyListener.cs
- RectangleGeometry.cs
- ByteConverter.cs
- DebuggerAttributes.cs
- Version.cs
- FunctionQuery.cs
- SectionInformation.cs
- _NTAuthentication.cs
- OdbcStatementHandle.cs
- CodeGenHelper.cs
- CreateUserWizardStep.cs
- WorkflowFormatterBehavior.cs
- EmbeddedMailObject.cs
- AesCryptoServiceProvider.cs
- EncryptedPackageFilter.cs
- BinaryMethodMessage.cs
- ObjectListShowCommandsEventArgs.cs
- SystemUnicastIPAddressInformation.cs
- RoutedEventValueSerializer.cs
- DurableInstanceManager.cs
- IntellisenseTextBox.designer.cs
- SecurityTokenException.cs
- DuplicateContext.cs
- GlyphingCache.cs
- BrowserCapabilitiesFactory.cs
- DataGridItemAutomationPeer.cs
- ProxyGenerationError.cs
- SecondaryIndex.cs
- RemoteWebConfigurationHostStream.cs
- DoubleStorage.cs
- CollectionConverter.cs
- DefaultMergeHelper.cs
- ExcludeFromCodeCoverageAttribute.cs
- StreamGeometryContext.cs
- Pointer.cs
- XmlProcessingInstruction.cs
- SuppressedPackageProperties.cs
- MemberAccessException.cs
- XamlGridLengthSerializer.cs
- SqlServices.cs
- ColorAnimation.cs
- FieldReference.cs
- HttpClientCertificate.cs
- NavigationWindowAutomationPeer.cs
- ContextMarshalException.cs
- InfoCardUIAgent.cs
- RuntimeHelpers.cs
- XamlUtilities.cs
- ObjectDataSourceStatusEventArgs.cs
- WebServiceErrorEvent.cs
- BuilderPropertyEntry.cs
- RadioButtonStandardAdapter.cs
- RuntimeResourceSet.cs
- SyndicationContent.cs
- DrawingImage.cs
- DBSchemaRow.cs
- ElementUtil.cs
- LayoutSettings.cs
- _FixedSizeReader.cs
- LongValidator.cs
- DatagridviewDisplayedBandsData.cs
- PrintDocument.cs
- GenericRootAutomationPeer.cs
- SafeFileHandle.cs
- Constraint.cs
- Int64Converter.cs
- TransformGroup.cs
- ConsumerConnectionPointCollection.cs
- EqualityComparer.cs
- RealizationContext.cs
- DefaultExpression.cs
- SmiGettersStream.cs
- ServiceDescription.cs
- TextElementEnumerator.cs
- ArrayElementGridEntry.cs
- WebPartZone.cs
- Directory.cs