I suggest you ...

Add a resolve method like ResolveInScope<IFoo>(IDisposable scope [, object args])

We have implemented the new(?) LifeStyleScope. We begin a new scope for each new dialog/window to enable e.g. an optimale use of unit of works. It works well, but I had a lot of trouble to enable using factories (for our view models). Reason: because the components are created lazily within a factory, Windsor cannot select the correct instance. What we have done is to also make the factory's lifestyle scoped and pass all scoped components to it right after creation. The factory then passes those cached components as anonymous types during creation. That works for most scenarios.

What I am missing and what would best resolve that use case would be an overload of Resolve, like: ResolveInScope<IFoo>(IDisposable scope [, object args]). This way I could define the scope in which the type and its dependencies have to be resolved.

Is this possible or does it break some meaning I don't have in mind?

6 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…)
    Alexander Ziegler shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    0 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...

      Feedback and Knowledge Base