예제 #1
0
 public override async Task DuplexStreamingServerHandler <TRequest, TResponse>(IAsyncStreamReader <TRequest> requestStream, IServerStreamWriter <TResponse> responseStream, ServerCallContext context, DuplexStreamingServerMethod <TRequest, TResponse> continuation)
 {
     try
     {
         //因此地方不能正確的讀到Request.Body或Response.Body
         //且也不能去讀requestStream & responseStream,會造成主邏輯會讀到空,stream類型的log可能要改成IActionFilter
         await base.DuplexStreamingServerHandler(requestStream, responseStream, context, continuation);
     }
     catch (Exception e)
     {
         LogExceptionAndReturnResponse(context.Method, requestStream.ToString(), responseStream.ToString(), e);
     }
 }