VContainer icon indicating copy to clipboard operation
VContainer copied to clipboard

Injecting from child into parent

Open DanielDPielok opened this issue 1 year ago • 1 comments

Hi,

First I have to thank you for providing such an awesome framework for free. We really enjoy working with it in several projects now. But we have one issue which we are not able to solve yet: I am trying to inject an instance from a child LifetimeScope into a registered class in it's parent LifetimeScope. The other way around works perfectly fine, I can register an instance in the parent and all injects of that instance in all classes of the child scope can be resolved. Can you give me a hint?

Thanks in advance.
Daniel

DanielDPielok avatar Jan 11 '24 14:01 DanielDPielok

Interesting report.. Thanks for looking into it.

For example a base class, that is located in another csproj)

I see. Perhaps it's because I'm checking the [Inject] method and ctor back to the base class.

I will try to address this. Thanks.

hadashiA avatar Jan 13 '24 09:01 hadashiA