Exemplo n.º 1
0
        public OrderRpcService(IOptions <OrderRpcServcieSetting> setting, IHttpContextAccessor httpContext)
        {
            _setting = setting.Value;

            _channel = GrpcServiceHelper.CreateAuthenticatedChannel(_setting.OrderServcieHost, httpContext);
            _client  = new Orders.OrdersClient(_channel);
        }
Exemplo n.º 2
0
        public ProductRpcService(IOptions <OrderRpcServcieSetting> setting, IHttpContextAccessor httpContext)
        {
            _setting     = setting.Value;
            _httpContext = httpContext;

            // GrpcChannel.ForAddress(_setting.OrderServcieHost);
            _channel = GrpcServiceHelper.CreateAuthenticatedChannel(_setting.OrderServcieHost, httpContext);
            _client  = new Products.ProductsClient(_channel);
        }