I believe the resolution of configuration properties in the xml
configuration is done during interpretation of the config, rather then being
handled by the microkernel later on - so doing this "out of the box" with
the fluent registration API would require some alternative approach... I
could be wrong though, haven't looked at the xml interpreter code for a
while.
One way to do this would be to store a simple Dictionary<string, object> in
your container that your plugins can write configuration values to then
replace the configuration parameters inspector with your own implementation
which can lookup the types in that dictionary when the parameter has a
certain format i.e. #{key} - as a starting point the code I posted on this
stack overflow question a while back might be useful -
http://stackoverflow.com/questions/381734/castle-windsor-how-to-specify-a-runtime-value-as-a-parameter-e-g-value-returne/384341#384341
Cheers,
- Alex
On Tue, Apr 7, 2009 at 7:19 PM, Mauro Servienti
<[email protected]>wrote:
>
> Hi,
>
> On Apr 7, 8:45 am, "Henrik Feldt" <[email protected]> wrote:
> >
> Kernel.Register(Component.For<IMyService>().ImplementedBy<MyServiceImpl>().P
> > arameters(Parameter.ForKey("keyName").Eq(somevalue)));
> >
>
> I know how it works, but that's not what I need. Using xml config you
> can add Properties to the configuration and that retrive property
> value via poroperti id.
> For various reasons I need to do the same thing via code.
>
> What I have is a plugin based app (something more complex but the base
> concept is plugin model) during the app/plugin startup process
> everyone
> is responsibile to inject his configuration in the container and in
> some cases I need to simply inject properties that can then be used
> elsewhere.
>
> TIA, Best regards
> .m
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---