Microsoft.Protocols.TestSuites.Common.RopSetMessageReadFlagResponse.Deserialize C# (CSharp) Method

Deserialize() public method

Deserialize the ROP response buffer.
public Deserialize ( byte ropBytes, int startIndex ) : int
ropBytes byte ROPs bytes in response.
startIndex int The start index of this ROP.
return int
        public int Deserialize(byte[] ropBytes, int startIndex)
        {
            int index = startIndex;
            this.RopId = ropBytes[index++];
            this.ResponseHandleIndex = ropBytes[index++];
            this.ReturnValue = (uint)BitConverter.ToInt32(ropBytes, index);
            index += 4;

            // Only success response has below fields
            if (this.ReturnValue == 0)
            {
                this.ReadStatusChanged = ropBytes[index++];
                if (this.ReadStatusChanged != 0)
                {
                    this.LogonId = ropBytes[index++];
                    this.ClientData = new byte[24];
                    Array.Copy(ropBytes, index, this.ClientData, 0, 24);
                    index += 24;
                }
            }

            return index - startIndex;
        }
    }
RopSetMessageReadFlagResponse