このユニティ登録に相当するninjectsで立ち往生しています:
var container = new UnityContainer();
container.RegisterType<MyFactory>(new ContainerControlledLifetimeManager());
// resolve instances once per child container by MyFactory
container.RegisterType<IMyInstance>(new HierarchicalLifetimeManager(),
new InjectionFactory(c => c.Resolve<MyFactory>().GetMyInstance()));
すでに効果なしでこれを試みました:
var kernel = new StandardKernel();
kernel.Bind<MyFactory>().ToSelf().InSingletonScope();
// context preserving get should do the job for child containers, right?
// thought in call scope ist the equivalent to unity's hierarchical lifetime manager?
kernel.Bind<IMyInstance>().ToMethod(ctx => ctx.ContextPreservingGet<MyFactory>().GetMyInstance())
.InCallScope();