I think you can do that using an XmlInterpreter that takes a stream
On Fri, Mar 6, 2009 at 4:31 AM, chitech <[email protected]> wrote:
>
> Is it possible to make a instance of WindsorContainer with a xml
> contents as parameter. The windsor configuration file is a embedded
> resource and I would like to do something like this:
>
> public static string GetResource(string resourceName)
> {
> var assembly = Assembly.GetExecutingAssembly();
> TextReader textReader = new StreamReader
> (assembly.GetManifestResourceStream(resourceName));
> var result = textReader.ReadToEnd();
> textReader.Close();
>
> return result;
> }
>
> container = new WindsorContainer(GetResource("windsor.xml"));
>
> Or should I use AddComponent and drop my configuration file?
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---