Scrutor
Scrutor copied to clipboard
As(Func<Type, IEnumerable<Type>>) and Singleton Lifetime
Currently As(Func<Type, IEnumerable<Type>> selector); allows to specify multiple types, but all of them are registered as separate instances. This causes a problem for me with singleton lifetime as now I have multiple objects.
It feels like it should set up type forwarding similar to how ILifetimeSelector AsSelfWithInterfaces(); does.
What are your thoughts on this?
A possible workaround for this is described here https://github.com/khellang/Scrutor/issues/47#issuecomment-391663163.
Maybe, but it would be a breaking change 😅