Пример #1
0
        public static byte[] BuildResponseMessage(RemotingResponse response)
        {
            var sequenceBytes = BitConverter.GetBytes(response.Sequence);
            var codeBytes     = BitConverter.GetBytes(response.Code);
            var message       = new byte[sequenceBytes.Length + codeBytes.Length + response.Body.Length];

            sequenceBytes.CopyTo(message, 0);
            codeBytes.CopyTo(message, sequenceBytes.Length);
            response.Body.CopyTo(message, sequenceBytes.Length + codeBytes.Length);

            return(message);
        }
Пример #2
0
 public void SetResponse(RemotingResponse response)
 {
     _taskSource.TrySetResult(response);
 }