Example #1
0
        public Task SendAsync(AmpMessage message)
        {
            ReceiveMessage = message;

            _handler.RaiseReceive(message);
            return(Task.CompletedTask);
        }
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);
        }