ConfigurationSectionCloner Class

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

public 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.

System.Object
  Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSectionCloner
Show: