예제 #1
0
 public override TResponse BlockingUnaryCall <TRequest, TResponse>(TRequest request, ClientInterceptorContext <TRequest, TResponse> context, BlockingUnaryCallContinuation <TRequest, TResponse> continuation)
 {
     try
     {
         return(base.BlockingUnaryCall(request, context, continuation));
     }
     catch (RpcException ex) when(ex is IRpcExceptionDetail)
     {
         throw RpcExceptionDecorator.Decorate(ex);
     }
 }
예제 #2
0
 public override async Task <TResponse> ClientStreamingServerHandler <TRequest, TResponse>(IAsyncStreamReader <TRequest> requestStream, ServerCallContext context, ClientStreamingServerMethod <TRequest, TResponse> continuation)
 {
     try
     {
         return(await base.ClientStreamingServerHandler(requestStream, context, continuation));
     }
     catch (RpcException ex) when(ex is IRpcExceptionDetail)
     {
         throw RpcExceptionDecorator.Decorate(ex);
     }
 }
예제 #3
0
 public override async Task <TResponse> UnaryServerHandler <TRequest, TResponse>(TRequest request, ServerCallContext context, UnaryServerMethod <TRequest, TResponse> continuation)
 {
     try
     {
         return(await base.UnaryServerHandler(request, context, continuation));
     }
     catch (RpcException ex) when(ex is IRpcExceptionDetail)
     {
         throw RpcExceptionDecorator.Decorate(ex);
     }
 }
예제 #4
0
 public override async Task DuplexStreamingServerHandler <TRequest, TResponse>(IAsyncStreamReader <TRequest> requestStream, IServerStreamWriter <TResponse> responseStream, ServerCallContext context,
                                                                               DuplexStreamingServerMethod <TRequest, TResponse> continuation)
 {
     try
     {
         await base.DuplexStreamingServerHandler(requestStream, responseStream, context, continuation);
     }
     catch (RpcException ex) when(ex is IRpcExceptionDetail)
     {
         throw RpcExceptionDecorator.Decorate(ex);
     }
 }