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; } }
public async Task <TResponse> UnaryServerHandler(TRequest request, UnaryServerMethod <TRequest, TResponse> continuation) { try { _logger.Request(request); var response = await continuation(request, _context).ConfigureAwait(false); _logger.Response(response); _logger.FinishSuccess(); return(response); } catch (Exception ex) { _logger.FinishException(ex); throw; } }