Microsoft.Protocols.TestSuites.Common.LongTermId.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.DatabaseGuid = new byte[16];
            Array.Copy(ropBytes, index, this.DatabaseGuid, 0, sizeof(byte) * 16);
            index += sizeof(byte) * 16;
            this.GlobalCounter = new byte[6];
            Array.Copy(ropBytes, index, this.GlobalCounter, 0, sizeof(byte) * 6);
            index += sizeof(byte) * 6;

            // 0 would hold 2 bytes.
            index += 2;
               
            return index - startIndex;
        }
    }