Bug? Calling InjectedMembers.ConfigureInjectionFor after BuildPlan is created

Mar 24, 2008 at 9:17 PM
1) Resolve a type.
2) Configure the type for injection via Configure<InjectedMembers>().ConfigureInjectionFor<TypeName>.
3) Resolve type again.

The configured injection does not execute, since the buildplan has already been compiled. Perhaps there is a way to clear the current IBuildPlanPolicy from the PolicyList so that the updated injection configuration fires correctly?

Thanks!
Mar 24, 2008 at 10:14 PM
Sounds like a bug. It would be pretty easy to clear the build plan itself. The dependency resolvers would get left behind without some more surgery. Is this something you'd want to do a lot of, or just every once in a while?
Mar 24, 2008 at 10:35 PM


ctavares wrote:
Is this something you'd want to do a lot of, or just every once in a while?


This is actually happening because I am creating some of my objects during configuration. So when my container is configured and I get it back from my helper method, then the plan has already been built. So really it should happen once in a typical scenario (although I'm not quite ready to say I'm typical just yet).

Mar 25, 2008 at 5:33 AM
I checked in a fix earlier today, which will be in the next drop. the "ConfigureInjectionFor" method will dump any existing build plan for the type/name you're configuring.