コード例 #1
0
        public Task <RpcResult <FooRes> > FooAsync(FooReq req)
        {
            RpcResult <FooRes> result = new RpcResult <FooRes> {
                Data = new FooRes {
                    RetWord = req.FooWord
                }
            };

            return(Task.FromResult(result));
        }
コード例 #2
0
        public Task <RpcResult <FooRes> > FooAsync(FooReq req)
        {
            RpcResult <FooRes> result = new RpcResult <FooRes> {
                Data = new FooRes {
                    RetWord = req.FooWord
                }
            };

            //throw  new Exception("测试异常");
            return(Task.FromResult(result));
        }