Microsoft.Protocols.TestSuites.MS_OXCMAPIHTTP.ModPropsRequestBody.Serialize C# (CSharp) Method

Serialize() public method

Serialize the instance to byte array.
public Serialize ( ) : byte[]
return byte[]
        public override byte[] Serialize()
        {
            List<byte> listByte = new List<byte>();

            listByte.AddRange(BitConverter.GetBytes(this.Reserved));
            listByte.AddRange(BitConverter.GetBytes(this.HasState));
            if (this.HasState)
            {
                listByte.AddRange(this.State.Serialize());
            }

            listByte.AddRange(BitConverter.GetBytes(this.HasPropertyTagsToRemove));
            if (this.HasPropertyTagsToRemove)
            {
                listByte.AddRange(BitConverter.GetBytes(this.PropertyTagsToRemove.PropertyTagCount));
                for (int i = 0; i < this.PropertyTagsToRemove.PropertyTagCount; i++)
                {
                    listByte.AddRange(this.PropertyTagsToRemove.PropertyTags[i].Serialize());
                }
            }

            listByte.AddRange(BitConverter.GetBytes(this.HasPropertyValues));
            if (this.HasPropertyValues)
            {
                listByte.AddRange(BitConverter.GetBytes(this.PropertyVaules.PropertyValueCount));
                for (int i = 0; i < this.PropertyVaules.PropertyValueCount; i++)
                {
                    listByte.AddRange(this.PropertyVaules.PropertyValues[i].Serialize());
                }
            }

            listByte.AddRange(BitConverter.GetBytes(this.AuxiliaryBufferSize));
            listByte.AddRange(this.AuxiliaryBuffer);

            return listByte.ToArray();
        }
    }
ModPropsRequestBody