Пример #1
0
 public UnaryResult <MyResponse> Unary2(MyRequest req)
 {
     return(UnaryResult(new MyResponse
     {
         Id = req.Id,
         Data = req.Data
     }));
 }
Пример #2
0
 public Task <ServerStreamingResult <MyResponse> > ServerStreamingResult2(MyRequest req)
 {
     throw new NotImplementedException();
 }
Пример #3
0
 public UnaryResult <MyResponse> Unary2(MyRequest req)
 {
     throw new NotImplementedException();
 }
Пример #4
0
        public async Task <ServerStreamingResult <MyResponse> > ServerStreamingResult2(MyRequest req)
        {
            var stream = GetServerStreamingContext <MyResponse>();
            await stream.WriteAsync(new MyResponse { Id = req.Id, Data = req.Data });

            return(stream.Result());
        }