예제 #1
0
 public Task <RpcResult <FooRes> > Foo2Async(FooReq req)
 {
     return(Task.FromResult(new RpcResult <FooRes> {
         Data = new FooRes {
             RetFooWord = req.FooWord
         }
     }));
 }
예제 #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);
        }
예제 #3
0
 public Task <RpcResult> Foo1Async(FooReq req)
 {
     return(Task.FromResult(new RpcResult()));
 }