Microsoft.Protocols.TestSuites.Common.RopMoveCopyMessagesResponse.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.SourceHandleIndex = ropBytes[index++];
            this.ReturnValue = (uint)BitConverter.ToInt32(ropBytes, index);
            index += sizeof(uint);

            // Success response doesn't contain DestHandleIndex field
            // 0x00000503 indicates NullDestinationObject(MS-OXCDATA section 2.4)
            if (this.ReturnValue != 0x00000503) 
            {
                this.PartialCompletion = ropBytes[index++];
            }
            else
            {
                this.DestHandleIndex = (uint)BitConverter.ToInt32(ropBytes, index);
                index += sizeof(uint);
                this.PartialCompletion = ropBytes[index++];
            }
                                                                                                                                                                                                
            return index - startIndex;
        }
    }
RopMoveCopyMessagesResponse