示例#1
0
 public void SetResults(int i, Exception ex)
 {
     _responses[i] = new RpcBatchResponse()
     {
         ErrorCode    = RpcErrorCode.ServerError,
         ResponseData = ex != null?Encoding.UTF8.GetBytes(ex.ToString()) : null
     };
 }
示例#2
0
 public void SetResults <T>(int i, T value)
 {
     _responses[i] = new RpcBatchResponse()
     {
         ErrorCode    = RpcErrorCode.OK,
         ResponseData = ProtoBufSerializer.ToByteArray(value),
     };
 }