Exemplo n.º 1
0
        public override async Task <TResponse> UnaryServerHandler <TRequest, TResponse>(TRequest request, ServerCallContext context, UnaryServerMethod <TRequest, TResponse> continuation)
        {
            _processor.BeginRequest(context);

            return(await Handler <TRequest, TResponse>(context, async() =>
            {
                return await continuation(request, context);
            }));
        }
Exemplo n.º 2
0
        public override async Task <TResponse> UnaryServerHandler <TRequest, TResponse>(TRequest request, ServerCallContext context, UnaryServerMethod <TRequest, TResponse> continuation)
        {
            _processor.BeginRequest(context);
            try
            {
                var response = await continuation(request, context);

                _processor.EndRequest(context);
                return(response);
            }
            catch (Exception ex)
            {
                _processor.DiagnosticUnhandledException(ex);
                throw ex;
            }
        }