public TResponse BlockingUnaryCall(TRequest request, Interceptor.BlockingUnaryCallContinuation <TRequest, TResponse> continuation)
 {
     try
     {
         _logger.Request(request);
         var response = continuation(request, _context);
         _logger.Response(response);
         _logger.FinishSuccess();
         return(response);
     }
     catch (Exception ex)
     {
         _logger.FinishException(ex);
         throw;
     }
 }
Ejemplo n.º 2
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;
     }
 }
Ejemplo n.º 3
0
 public override TResponse BlockingUnaryCall <TRequest, TResponse>(TRequest request, ClientInterceptorContext <TRequest, TResponse> context, Interceptor.BlockingUnaryCallContinuation <TRequest, TResponse> continuation)
 {
     return(continuation(request, context));
 }
Ejemplo n.º 4
0
        public override TResponse BlockingUnaryCall <TRequest, TResponse>(TRequest request, ClientInterceptorContext <TRequest, TResponse> context, Interceptor.BlockingUnaryCallContinuation <TRequest, TResponse> continuation)
        {
            var callOptions = SetDeadline(context.Options);
            var newContext  = new ClientInterceptorContext <TRequest, TResponse>(context.Method, context.Host, callOptions);

            return(continuation(request, newContext));
        }