Open Xonoroff opened 5 years ago
If I'm working inside subcontainer I want to have opportunity to bind IInitializable to class that was binded inside subcontainer.
public override void InstallBindings() { Container.Bind<InitializeableClass>().FromSubContainerResolve().ByMethod(Sub).AsTransient(); Container.Bind<MyClass>().AsTransient(); Container.Resolve<MyClass>(); Container.Resolve<MyClass>(); Container.Resolve<MyClass>(); } public void Sub(DiContainer container) { container.Bind<InitializeableClass>().AsSingle(); container.Bind<IInitializable>().To<InitializeableClass>().FromResolve(); } public class MyClass { [Inject] private InitializeableClass asdasd; } public class InitializeableClass : IInitializable { public void Initialize() { throw new NotImplementedException(); } }
Have the same issue. Help.
If I'm working inside subcontainer I want to have opportunity to bind IInitializable to class that was binded inside subcontainer.