Is there a way to make a configuration section that allows you to create a free-form XML body? How can I get a free form body in code?
For example, I would like to create a ModuleConfigurationSection as follows:
<modules> <module name="ModuleA" type="My.Namespace.ModuleA, My.Assembly"> <moduleConfig> <serviceAddress>http://myserver/myservice.svc</serviceAddress> </moduleConfig> </module> <module name="ModuleB" type="My.Namespace.ModuleB, My.OtherAssembly"> <moduleConfig> <filePath>c:\directory</filePath> </moduleConfig> </module> </modules>
Thus, some code will deploy each of these types of modules from configuration sections using ConfigurationManager.GetSection("modules") , and I would like to pass the XML inside the moduleConfig element as an opaque configuration value for the module class constructor.
Any input is appreciated!
joshperry
source share