Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// 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;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EventPrivateKey.cs
- SqlNodeAnnotation.cs
- SafeRightsManagementEnvironmentHandle.cs
- HtmlInputPassword.cs
- XmlTextEncoder.cs
- SelectionRangeConverter.cs
- Thickness.cs
- SerializationHelper.cs
- __Error.cs
- DataGridViewRowCancelEventArgs.cs
- ListDictionary.cs
- Thumb.cs
- SecurityDocument.cs
- BitmapCache.cs
- Accessors.cs
- RsaSecurityToken.cs
- IdentitySection.cs
- SqlBulkCopyColumnMapping.cs
- HostUtils.cs
- TextBox.cs
- ToolboxControl.cs
- SearchExpression.cs
- StatusBarItem.cs
- ConfigurationSectionGroup.cs
- MatrixConverter.cs
- RSAOAEPKeyExchangeDeformatter.cs
- CatalogPartCollection.cs
- DesignBinding.cs
- BindingMemberInfo.cs
- Delay.cs
- ObjectView.cs
- DataGridHelper.cs
- TaskResultSetter.cs
- CqlParserHelpers.cs
- SoapCodeExporter.cs
- MaterialGroup.cs
- ProviderBase.cs
- ProtocolsConfiguration.cs
- BaseCollection.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- SamlAudienceRestrictionCondition.cs
- ToolboxItem.cs
- SchemaNamespaceManager.cs
- AspNetHostingPermission.cs
- ScrollPatternIdentifiers.cs
- PrivateFontCollection.cs
- MessageLogTraceRecord.cs
- XmlILModule.cs
- HttpPostedFile.cs
- SwitchAttribute.cs
- ObjectHandle.cs
- URLIdentityPermission.cs
- CustomBindingElement.cs
- String.cs
- MediaSystem.cs
- ArrayItemValue.cs
- PassportAuthenticationModule.cs
- DataReaderContainer.cs
- ArrayConverter.cs
- ContentHostHelper.cs
- DataGridAddNewRow.cs
- SQLSingle.cs
- exports.cs
- DataGridViewCheckBoxColumn.cs
- EventLogTraceListener.cs
- Overlapped.cs
- TimeSpan.cs
- EncryptedReference.cs
- TextBlock.cs
- Calendar.cs
- ControlSerializer.cs
- EntityDataSourceColumn.cs
- ColumnMapCopier.cs
- GatewayIPAddressInformationCollection.cs
- ThemeDirectoryCompiler.cs
- GZipStream.cs
- AutomationPropertyInfo.cs
- ParameterBinding.cs
- GcSettings.cs
- Blend.cs
- X509CertificateValidator.cs
- ContextQuery.cs
- DataGridViewCellStyleChangedEventArgs.cs
- BrowserInteropHelper.cs
- MouseCaptureWithinProperty.cs
- RegexEditorDialog.cs
- TextServicesCompartment.cs
- EmptyEnumerable.cs
- PeerInvitationResponse.cs
- WebBrowserNavigatingEventHandler.cs
- ResourceManager.cs
- DoubleAnimationBase.cs
- ThicknessAnimationBase.cs
- BuildManagerHost.cs
- PerformanceCounterPermissionEntryCollection.cs
- PageThemeBuildProvider.cs
- WorkflowTimerService.cs
- Point3DValueSerializer.cs
- ContainerUtilities.cs
- DataBoundControlAdapter.cs