public int Deserialize(byte[] ropBytes, int startIndex)
{
int index = startIndex;
this.RopId = ropBytes[index++];
this.SourceHandleIndex = ropBytes[index++];
this.ReturnValue = (uint)BitConverter.ToInt32(ropBytes, index);
index += sizeof(uint);
// Only success response has below fields
if (this.ReturnValue == 0)
{
this.PropertyProblemCount = (ushort)BitConverter.ToInt16(ropBytes, index);
index += sizeof(ushort);
if (this.PropertyProblemCount >= 0)
{
this.PropertyProblems = new PropertyProblem[this.PropertyProblemCount];
for (int i = 0; i < this.PropertyProblemCount; i++)
{
index += this.PropertyProblems[i].Deserialize(ropBytes, index);
}
}
}
else if (this.ReturnValue == 0x00000503)
{
this.DestHandleIndex = (uint)BitConverter.ToInt32(ropBytes, index);
index += sizeof(uint);
}
return index - startIndex;
}
}