Exemplo n.º 1
0
 public TResponse BlockingUnaryCall(TRequest request, Interceptor.BlockingUnaryCallContinuation <TRequest, TResponse> continuation)
 {
     try
     {
         _tracer.Request(request, _context);
         var response = continuation(request, _context);
         _tracer.Response(response, _context);
         _tracer.Finish(_context);
         return(response);
     }
     catch (Exception ex)
     {
         _tracer.Exception(_context, ex, request);
         throw;
     }
 }
        public override TResponse BlockingUnaryCall <TRequest, TResponse>(Method <TRequest, TResponse> method, string host, CallOptions options, TRequest request)
        {
            var _context = new ClientInterceptorContext <TRequest, TResponse>(method, host, options);

            try
            {
                _tracer.Request(request, _context);
                var response = Calls.BlockingUnaryCall(CreateCall(method, host, options), request);
                _tracer.Response(response, _context);
                _tracer.Finish(_context);
                return(response);
            }
            catch (Exception ex)
            {
                _tracer.Exception(_context, ex, request);
                throw;
            }
        }