Microsoft.Protocols.TestSuites.Common.RopGetRulesTableResponse.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)
        {
            IntPtr responseBuffer = new IntPtr();
            responseBuffer = Marshal.AllocHGlobal(Marshal.SizeOf(this));
            try
            {
                Marshal.Copy(ropBytes, startIndex, responseBuffer, Marshal.SizeOf(this));
                this = (RopGetRulesTableResponse)Marshal.PtrToStructure(responseBuffer, typeof(RopGetRulesTableResponse));
                return Marshal.SizeOf(this);
            }
            finally
            {
                Marshal.FreeHGlobal(responseBuffer);
            }
        }
    }
RopGetRulesTableResponse