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();
}
}