Microsoft.Protocols.TestSuites.Common.RopFindRowRequest.Serialize C# (CSharp) Method

Serialize() public method

Serialize the ROP request buffer.
public Serialize ( ) : byte[]
return byte[]
        public byte[] Serialize()
        {
            int index = 0;
            byte[] serializeBuffer = new byte[this.Size()];

            serializeBuffer[index++] = this.RopId;
            serializeBuffer[index++] = this.LogonId;
            serializeBuffer[index++] = this.InputHandleIndex;
            serializeBuffer[index++] = this.FindRowFlags;

            Array.Copy(BitConverter.GetBytes((short)this.RestrictionDataSize), 0, serializeBuffer, index, sizeof(ushort));
            index += sizeof(ushort);

            if (this.RestrictionData != null)
            {
                Array.Copy(this.RestrictionData, 0, serializeBuffer, index, this.RestrictionData.Length);
                index += this.RestrictionData.Length;
            }

            serializeBuffer[index++] = this.Origin;

            Array.Copy(BitConverter.GetBytes((short)this.BookmarkSize), 0, serializeBuffer, index, sizeof(ushort));
            index += sizeof(ushort);
            if (this.Bookmark != null)
            {
                Array.Copy(this.Bookmark, 0, serializeBuffer, index, this.Bookmark.Length);
                index += this.Bookmark.Length;
            }

            return serializeBuffer;
        }
RopFindRowRequest