How can I get the previous dependency instance of the same type?
infinnie opened this issue · 5 comments
infinnie commented
For example, when I wanted to inject a dependency that is my implementation of the type IMyInterface
, I wanted my dependency to have access to the previously injected IMyInterface
dependency instance. How could I achieve that?
davidfowl commented
It's not supported in this container implementation.
infinnie commented
Whoops. Any plans for shimming that?
rayao commented
I dealt with this with a generic interface like
public interface IChainComposed<TService> { TService Service { get; } }
And make the implementation class constructor has an IEnumerable<TService>
parameter, and then chain all service instances there.
Eilon commented
Closing because there are no plans to implement this.