I have this interface:
public interface IObjectFactory<T>
{
T NewObject();
}
and I could have multiple classes that implement this interface with a different paramenter like this
public class UserFactory : IObjectFactory<IUser>
{
public IUser NewObject() => new User();
}
I would like to scan all the assemblies for binding all the classes so I can use without to create a direct binding instruction.
The problem I have is a generic interface and normal samples don't work.
How can I solve this?