Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- ImageField.cs
- AsyncPostBackTrigger.cs
- CustomErrorCollection.cs
- PeekCompletedEventArgs.cs
- TextDecorationCollectionConverter.cs
- ContainerVisual.cs
- Soap11ServerProtocol.cs
- Model3DGroup.cs
- XmlSchemaException.cs
- SapiRecoContext.cs
- Context.cs
- CharacterMetrics.cs
- ValidationError.cs
- SqlStream.cs
- PrintPageEvent.cs
- NativeMethods.cs
- Helpers.cs
- DockEditor.cs
- BooleanProjectedSlot.cs
- wmiprovider.cs
- MeasureItemEvent.cs
- ContentDisposition.cs
- dataprotectionpermission.cs
- EnumUnknown.cs
- UTF32Encoding.cs
- LayoutTableCell.cs
- ClientRoleProvider.cs
- PageRequestManager.cs
- Privilege.cs
- EmptyEnumerator.cs
- DSACryptoServiceProvider.cs
- ListItemConverter.cs
- StringExpressionSet.cs
- GenerateScriptTypeAttribute.cs
- ContainerFilterService.cs
- IndentTextWriter.cs
- EventSourceCreationData.cs
- PhysicalAddress.cs
- ListItemCollection.cs
- TreeNodeStyleCollectionEditor.cs
- HttpHandlerActionCollection.cs
- XmlSerializerSection.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- AttributeProviderAttribute.cs
- MetadataException.cs
- CharStorage.cs
- DataGridViewEditingControlShowingEventArgs.cs
- EditorPartChrome.cs
- LoginName.cs
- XmlIlTypeHelper.cs
- NumericUpDownAcceleration.cs
- mansign.cs
- DateTimeSerializationSection.cs
- UserNameSecurityTokenProvider.cs
- XomlCompilerResults.cs
- ProcessProtocolHandler.cs
- ProviderUtil.cs
- CheckPair.cs
- MailDefinition.cs
- TypeValidationEventArgs.cs
- NullableLongSumAggregationOperator.cs
- FamilyTypefaceCollection.cs
- DataGridColumnStyleMappingNameEditor.cs
- PseudoWebRequest.cs
- HttpModuleAction.cs
- GeneratedContractType.cs
- NetworkInformationPermission.cs
- InkCanvasSelectionAdorner.cs
- SupportsEventValidationAttribute.cs
- glyphs.cs
- ListBindingHelper.cs
- MimeXmlReflector.cs
- Registry.cs
- AvTraceFormat.cs
- DataGridViewRowCancelEventArgs.cs
- DrawingServices.cs
- DeploymentSection.cs
- CodeSubDirectoriesCollection.cs
- DeclarativeCatalogPartDesigner.cs
- XPathNavigatorReader.cs
- TraceUtility.cs
- ActiveDocumentEvent.cs
- NamespaceList.cs
- SqlInternalConnectionTds.cs
- SiteIdentityPermission.cs
- DSASignatureFormatter.cs
- _Rfc2616CacheValidators.cs
- FormatSettings.cs
- WebPartTransformerCollection.cs
- DataTable.cs
- ConfigurationSchemaErrors.cs
- EditCommandColumn.cs
- FixedSOMLineCollection.cs
- SignatureDescription.cs
- ErrorTableItemStyle.cs
- Win32Native.cs
- TextPenaltyModule.cs
- OracleConnectionString.cs
- XmlSerializerVersionAttribute.cs
- __Error.cs