Decoupling providers from configuration classes

Topics: Building and extending application blocks, Enterprise Library Core
Mar 25, 2014 at 8:46 PM
Hey there.

I created my own "application block" some time ago, using the ConfigurationElementTypeAttribute on some provider classes to enable their configuration via config files.

I would like to know if it is possible to decouple the provider implementation from the enterprise library itself. I would like to have the implementation on some place, and the related configuration classes in another dll. The way it works now ties my provider implementation to the Enterprise.Library.Common assembly because it requires my class to be annotated with the configuration attribute.

Isn't there a solution without this attribute? I would like to keep configuration support on the class only if another assembly (containing the extended NameTypeConfigurationElement) was also present.

If this was possible, it would make our core shared library much lighter and with fewer projects.