Microsoft.Protocols.TestSuites.Common.RopBufferTooSmallResponse.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.SizeNeeded = (ushort)BitConverter.ToInt16(ropBytes, index);
            index += sizeof(ushort);
            this.RequestBuffers = new byte[ropBytes.Length - index];
            Array.Copy(ropBytes, index, this.RequestBuffers, 0, ropBytes.Length - index);
            index += ropBytes.Length - index;
           
            return index - startIndex;
        }
    }
RopBufferTooSmallResponse