public Task <RpcResult <FooRes> > Foo2Async(FooReq req)
 {
     return(Task.FromResult(new RpcResult <FooRes> {
         Data = new FooRes {
             RetFooWord = req.FooWord
         }
     }));
 }
Example #2
0
        public Task SendAsync(AmpMessage message)
        {
            FooReq req = _serializer.Deserialize <FooReq>(message.Data);

            FooRes res = new FooRes {
                RetFooWord = req.FooWord
            };

            var resMessage = AmpMessage.CreateResponseMessage(message.ServiceId, message.MessageId);

            resMessage.Sequence = message.Sequence;
            resMessage.Data     = this._serializer.Serialize(res);
            _handler.RaiseReceive(resMessage);
            return(Task.CompletedTask);
        }
 public Task <RpcResult> Foo1Async(FooReq req)
 {
     return(Task.FromResult(new RpcResult()));
 }