Microsoft.Protocols.TestTools.StackSdk.RemoteDesktop.Rdpbcgr.RdpbcgrServerDecoder.ParseUInt32 C# (CSharp) Method

ParseUInt32() private method

Parse UInt32 (parser index is updated according to parsed length)
private ParseUInt32 ( byte data, int &index, bool isBigEndian ) : UInt32
data byte data to be parsed
index int parser index
isBigEndian bool big endian format flag
return UInt32
        private UInt32 ParseUInt32(byte[] data, ref int index, bool isBigEndian)
        {
            // Read 4 bytes
            byte[] bytes = GetBytes(data, ref index, sizeof(UInt32));

            // Big Endian format requires reversed byte order
            if (isBigEndian)
            {
                Array.Reverse(bytes, 0, sizeof(UInt32));
            }

            // Convert
            return BitConverter.ToUInt32(bytes, 0);
        }
RdpbcgrServerDecoder