public GeneralTrashHandler( bool enabled, TrashPriority priority = TrashPriority.Lowest, IEnumerable<Type> accepts = null, IEnumerable<Type> ignores = null) : base(enabled, priority, accepts, ignores) { }
public virtual void Deserialize(GenericReader reader) { var version = reader.GetVersion(); switch (version) { case 1: { IgnoreBlessed = reader.ReadBool(); IgnoreInsured = reader.ReadBool(); } goto case 0; case 0: { Enabled = reader.ReadBool(); UID = reader.ReadString(); _Priority = reader.ReadFlag <TrashPriority>(); _BonusTokens = reader.ReadInt(); _BonusTokensChance = reader.ReadInt(); Accepted = reader.ReadList(reader.ReadType); Ignored = reader.ReadList(reader.ReadType); } break; } if (version < 1) { IgnoreBlessed = true; IgnoreInsured = true; } }
public GeneralTrashHandler( bool enabled, TrashPriority priority = TrashPriority.Lowest, IEnumerable <Type> accepts = null, IEnumerable <Type> ignores = null) : base(enabled, priority, accepts, ignores) { }
public BaseTrashHandler( bool enabled, TrashPriority priority = TrashPriority.Normal, IEnumerable <Type> accepts = null, IEnumerable <Type> ignores = null) { UID = CryptoGenerator.GenString(CryptoHashType.MD5, GetType().FullName); Enabled = enabled; Priority = priority; Accepted = new List <Type>(accepts ?? DefaultAcceptList); Ignored = new List <Type>(ignores ?? DefaultIgnoredList); }
public BaseTrashHandler( bool enabled, TrashPriority priority = TrashPriority.Normal, IEnumerable<Type> accepts = null, IEnumerable<Type> ignores = null) { UID = CryptoGenerator.GenString(CryptoHashType.MD5, GetType().FullName); Enabled = enabled; Priority = priority; Accepted = new List<Type>(accepts ?? DefaultAcceptList); Ignored = new List<Type>(ignores ?? DefaultIgnoredList); }
public virtual void Deserialize(GenericReader reader) { int version = reader.GetVersion(); switch (version) { case 0: { Enabled = reader.ReadBool(); UID = reader.ReadString(); _Priority = reader.ReadFlag <TrashPriority>(); _BonusTokens = reader.ReadInt(); _BonusTokensChance = reader.ReadInt(); Accepted = reader.ReadList(reader.ReadType); Ignored = reader.ReadList(reader.ReadType); } break; } }
public virtual void Deserialize(GenericReader reader) { int version = reader.GetVersion(); switch (version) { case 0: { Enabled = reader.ReadBool(); UID = reader.ReadString(); _Priority = reader.ReadFlag<TrashPriority>(); _BonusTokens = reader.ReadInt(); _BonusTokensChance = reader.ReadInt(); Accepted = reader.ReadList(reader.ReadType); Ignored = reader.ReadList(reader.ReadType); } break; } }
public virtual void Deserialize(GenericReader reader) { var version = reader.GetVersion(); switch (version) { case 1: { IgnoreBlessed = reader.ReadBool(); IgnoreInsured = reader.ReadBool(); } goto case 0; case 0: { Enabled = reader.ReadBool(); UID = reader.ReadString(); _Priority = reader.ReadFlag<TrashPriority>(); _BonusTokens = reader.ReadInt(); _BonusTokensChance = reader.ReadInt(); Accepted = reader.ReadList(reader.ReadType); Ignored = reader.ReadList(reader.ReadType); } break; } if (version > 0) { return; } IgnoreBlessed = true; IgnoreInsured = true; }