public int Deserialize(byte[] ropBytes, int startIndex)
{
int index = startIndex;
this.RopId = ropBytes[index++];
this.InputHandleIndex = ropBytes[index++];
this.ReturnValue = (uint)BitConverter.ToInt32(ropBytes, index);
index += 4;
// Only success response has below fields
if (this.ReturnValue == 0)
{
this.RowCount = ropBytes[index++];
if (this.RowCount > 0)
{
this.RecipientRows = new ReadRecipientRow[this.RowCount];
for (int i = 0; i < this.RowCount; i++)
{
index += this.RecipientRows[i].Deserialize(ropBytes, index);
}
}
}
return index - startIndex;
}
}