public GrpcServiceClient(GrpcSearchClient searchClient, GrpcChannel channel, GrpcChannelOptions options) { _options = new GrpcClientOptions { ChannelOptions = options, ServiceAddress = channel.Target }; _searchClient = searchClient; _logger = options?.LoggerFactory?.CreateLogger <GrpcServiceClient>() ?? NullLogger <GrpcServiceClient> .Instance; // we pin this object only to be able to shut it down properly later _channel = channel; }
public GrpcServiceClient(IOptions <GrpcClientOptions> options, ILogger <GrpcServiceClient> logger) { _options = options.Value; _logger = logger; }