I suggest you ...

Add ability to override configuration in XML

The Binsor DSL has the extremely useful Extend macro, but it achieves this by replicating the ComponentModel data model, which isn't ideal.

So, the proposal is that we allow something along the lines of:

container.Register(
ExtendComponent.For<IService>.Parameters( <<so on and so on>>
)

Now, this is relatively simple to achieve if you can buffer the component registrations (in that ExtendComponent<For>.Component could return the original ComponentRegistration), but of course that would require a separate "process registrations step". A helper object might be needed.

The benefits should be relatively obvious. You could have your principal configuration done fluently within the code, with the environmental delta in a separate file, either XML, IronRuby or whatever.

25 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Julian BirchJulian Birch shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    3 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Mark SeemannMark Seemann commented  ·   ·  Flag as inappropriate

        I may completely misunderstand this request, but Windsor has a convention where the first registration 'wins'. This means that if you read in XML config as the first thing, any registration there wins over subsequent registrations. However, if the XML config contains nothing, subsequent registrations kick in. You can use this feature to override default services with XML config.

      • Julian BirchJulian Birch commented  ·   ·  Flag as inappropriate

        An additional remark: a rather likeable way of delivering this might be to provide it on derived containers. Then you could have a container for everyone, and a derived container for each tenant.

      Feedback and Knowledge Base