IBuilderContext.CloneForNewBuild Woes...

Mar 29, 2008 at 3:03 PM
I have a simple strategy that needs to get access to another service in the container to do its thing. I mentioned the problem here and the code below worked in previous drops, but now the call to ExecuteBuildUp just causes an infinite loop and stack overflow.

public override void PreBuildUp(IBuilderContext context) {
    NamedTypeBuildKey newBuildKey = new NamedTypeBuildKey(typeof(IMyService), null);
    IBuilderContext newContext = context.CloneForNewBuild(newBuildKey, null);
    object myObject = newContext.Strategies.ExecuteBuildUp(newContext);
    // ...

Do I need to do something differently now?


Mar 29, 2008 at 4:25 PM
This code hasn't changed in the recent drops. Could you send me a small project that reproduces the problem?
Mar 29, 2008 at 5:00 PM

I sent you a simple example.