Exemplo n.º 1
0
        protected override ClientProxy <TService> CreateProxyInner <TService>(string optionsName)
        {
            var options = _grpcClientOptions.Get(optionsName);

            if (options.IsPropertiesDefault())
            {
                return(null);
            }

            var f           = new GrpcClientConnectionFactory(new SimpleOptions <GrpcClientOptions>(options), _loggerFactory);
            var clientProxy = new GrpcClientProxy <TService>(f, new SimpleOptions <NetRpcClientOption>(_netRpcClientOption.CurrentValue), _serviceProvider, _loggerFactory, optionsName);

            return(clientProxy);
        }
Exemplo n.º 2
0
        protected override ClientProxy <TService>?CreateProxyInner <TService>(string optionsName)
        {
            var options = _grpcClientOptions.Get(optionsName);

            if (options.IsPropertiesDefault())
            {
                return(null);
            }

            var f           = new GrpcClientConnectionFactory(new SimpleOptions <GrpcClientOptions>(options), _loggerFactory);
            var clientProxy = new GrpcClientProxy <TService>(f,
                                                             new SimpleOptions <NClientOptions>(_nClientOption.CurrentValue),
                                                             _clientMiddlewareOptions,
                                                             _actionExecutingContextAccessor,
                                                             _serviceProvider,
                                                             _loggerFactory, optionsName);

            return(clientProxy);
        }