how do i register and resolve a generic object/interface in Unity? I’m trying to stay away from the config file.
I’m looking for something like
IEnterpriseClient<IInterface1> to resolve to EnterpriseClient<IInterface1>
The class signature is
class EnterpriseClient<T> : IEnterpriseClient<T> where T : class
Thanks!
It’s pretty much exactly what you’d think:
That’s if you only want that particular closed generic registered. For the open generic (not just IInterface1), you can do:
You mentioned you’d tried this – what’s not working?