/// <summary>
/// Deserialized byte array to a Restriction instance
/// </summary>
/// <param name="buffer">Byte array contain data of a Restriction instance.</param>
/// <returns>Bytes count that deserialized in buffer.</returns>
public override uint Deserialize(byte[] buffer)
{
BufferReader reader = new BufferReader(buffer);
this.RestrictType = (RestrictionType)reader.ReadByte();
this.propTag.PropertyType = reader.ReadUInt16();
this.propTag.PropertyId = reader.ReadUInt16();
return reader.Position;
}