Embedded Config File

Topics: Building and extending application blocks
Feb 18, 2008 at 12:15 PM
I'm not sure if I'm going about this backwards or something but I've got a dll that makes use of some of the Application Blocks in the Enterprise Library. There is no need for the config of these blocks to be modified by the user of this dll, so I've embedded the config inside the dll.

Now my problem is that the constructor for FileConfigurationSource expects a path to an actual file, obviously I don't want to have to write out the config just to read it back in. Is there anyway to get an IConfigurationSource out of a stream?

Having looked around I can see that I could programatically create the Blocks but that seems clunky to me. Does this make sense? Is there a better way to achieve the same thing?