Looking at the DI supported for gRPC clients, I was having troubles figuring out how the implementation for named gRPC clients should be made.
The Grpc.Net.ClientFactory
package offers such a functionality to register a named gRPC client. All examples I could find, however, directly inject a gRPC client into some class instead of creating it by a specified name with a factory.
There is a GrpcClientFactory
class from the same package that contains such a function to create a gRPC client based on a given name, however, it is abstract and the default implementation is internal. Unlike the IHttpClientFactory
it cannot be injected. My question is if it is necessary to create a GrpcClientFactory
implementation myself in order to use the named gRPC clients functionality or perhaps am I missing something.