public byte[] Serialize()
{
// 2.2.2.15 AUX_PERF_FAILURE
int size = (sizeof(short) * 4) + (sizeof(int) * 4) + sizeof(byte);
byte[] resultBytes = new byte[size];
int index = 0;
Array.Copy(BitConverter.GetBytes(this.ClientID), 0, resultBytes, index, sizeof(short));
index += sizeof(short);
Array.Copy(BitConverter.GetBytes(this.ServerID), 0, resultBytes, index, sizeof(short));
index += sizeof(short);
Array.Copy(BitConverter.GetBytes(this.SessionID), 0, resultBytes, index, sizeof(short));
index += sizeof(short);
Array.Copy(BitConverter.GetBytes(this.RequestID), 0, resultBytes, index, sizeof(short));
index += sizeof(short);
Array.Copy(BitConverter.GetBytes(this.TimeSinceRequest), 0, resultBytes, index, sizeof(int));
index += sizeof(int);
Array.Copy(BitConverter.GetBytes(this.TimeToFailRequest), 0, resultBytes, index, sizeof(int));
index += sizeof(int);
Array.Copy(BitConverter.GetBytes(this.ResultCode), 0, resultBytes, index, sizeof(int));
index += sizeof(int);
resultBytes[index] = this.RequestOperation;
index += sizeof(byte);
// The length of processName is three bytes, so the first byte will be abandoned.
Array.Copy(BitConverter.GetBytes(this.Reserved), 1, resultBytes, index, 3);
return resultBytes;
}
}