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