LifetimeManagers and the IBuilderContext

Mar 24, 2009 at 3:44 PM
Edited Mar 24, 2009 at 4:34 PM
Is there any way to retrieve the IBuilderContext from within a LifetimeManager?


[Edit]
Nevermind.  This wouldn't help me do what I wanted anyway.

Mar 24, 2009 at 5:37 PM
For future reference, the answer at this time is no. I plan to correct this in V2 - there's too many interesting scenarios you can't do without it.

Mar 24, 2009 at 6:53 PM
What I was really looking for is something that represents a resolution context.  So when resolving A causes a build up of B which causes a build up o f C, I'd like to know that A, B, and C are tied to the same initial resolution call.
Mar 24, 2009 at 9:19 PM
That is also on the list for V2. There's really nothing like that available in the current codebase.

You might be able to add something along these lines by tweaking the BuilderContext class - all recursive calls go through the CloneForNewBuild method, so you could theoretically capture the parent-child relationship somewhere. That would require hacking the core code; whether you're willing or interested in doing that is your call.