public GeneralTrashHandler(
			bool enabled,
			TrashPriority priority = TrashPriority.Lowest,
			IEnumerable<Type> accepts = null,
			IEnumerable<Type> ignores = null)
			: base(enabled, priority, accepts, ignores)
		{ }
Example #2
0
        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)
 {
 }
Example #4
0
 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);
		}
Example #6
0
        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;
			}
		}
Example #8
0
		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;
		}