ConfigurationSectionCloner Class

Clones a ConfigurationSection.

Namespace: Microsoft.Practices.EnterpriseLibrary.Common.Configuration
Assembly: Microsoft.Practices.EnterpriseLibrary.Common (in Microsoft.Practices.EnterpriseLibrary.Common.dll) Version: (6.0.1304.0)


public class ConfigurationSectionCloner
Public Class ConfigurationSectionCloner
public ref class ConfigurationSectionCloner


This will perform a clone of a ConfigurationSection by evaluating each element in the Properties. If these properties are themselves ConfigurationElement they will be cloned as well. As ConfigurationElementCollection items do not expose the ability to add and remove, any configuration collections must implement IMergeableConfigurationElementCollection to be cloned. If they do not implement this, they will be skipped during cloning. The enterprise library collections implement this interface and the cloner will properly handle the cloning of ConnectionStringSettingsCollection and KeyValueConfigurationCollection with an internal wrapper that implements IMergeableConfigurationElementCollection for these collections.

Inheritance Hierarchy


See Also

ConfigurationSectionCloner Members

Microsoft.Practices.EnterpriseLibrary.Common.Configuration Namespace