Exemple #1
1
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);

			int version = reader.GetVersion();

			switch (version)
			{
				case 1:
					reader.ReadBlock(r => Misc = r.ReadTypeCreate<AutoPvPMiscOptions>(r) ?? new AutoPvPMiscOptions(r));
					goto case 0;
				case 0:
					{
						if (version == 0)
						{
							Misc = new AutoPvPMiscOptions();
						}

						reader.ReadBlock(r => Commands = r.ReadTypeCreate<AutoPvPCommandOptions>(r) ?? new AutoPvPCommandOptions(r));
						reader.ReadBlock(r => Profiles = r.ReadTypeCreate<AutoPvPProfileOptions>(r) ?? new AutoPvPProfileOptions(r));
						reader.ReadBlock(r => Seasons = r.ReadTypeCreate<AutoPvPSeasonOptions>(r) ?? new AutoPvPSeasonOptions(r));
					}
					break;
			}
		}
Exemple #2
0
		public AutoPvPAdvancedOptions()
		{
			Commands = new AutoPvPCommandOptions();
			Profiles = new AutoPvPProfileOptions();
			Seasons = new AutoPvPSeasonOptions();
			Misc = new AutoPvPMiscOptions();
		}
Exemple #3
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.GetVersion();

            switch (version)
            {
            case 1:
            {
                reader.ReadBlock(() => { Misc = reader.ReadTypeCreate <AutoPvPMiscOptions>(reader) ?? new AutoPvPMiscOptions(reader); });
            }
                goto case 0;

            case 0:
            {
                if (version == 0)
                {
                    Misc = new AutoPvPMiscOptions();
                }

                reader.ReadBlock(
                    () => { Commands = reader.ReadTypeCreate <AutoPvPCommandOptions>(reader) ?? new AutoPvPCommandOptions(reader); });

                reader.ReadBlock(
                    () => { Profiles = reader.ReadTypeCreate <AutoPvPProfileOptions>(reader) ?? new AutoPvPProfileOptions(reader); });

                reader.ReadBlock(
                    () => { Seasons = reader.ReadTypeCreate <AutoPvPSeasonOptions>(reader) ?? new AutoPvPSeasonOptions(reader); });
            }
            break;
            }
        }
Exemple #4
0
 public AutoPvPAdvancedOptions()
 {
     Commands = new AutoPvPCommandOptions();
     Profiles = new AutoPvPProfileOptions();
     Seasons  = new AutoPvPSeasonOptions();
     Misc     = new AutoPvPMiscOptions();
 }
Exemple #5
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            var version = reader.GetVersion();

            switch (version)
            {
            case 1:
                reader.ReadBlock(r => Misc = r.ReadTypeCreate <AutoPvPMiscOptions>(r) ?? new AutoPvPMiscOptions());
                goto case 0;

            case 0:
            {
                reader.ReadBlock(r => Commands = r.ReadTypeCreate <AutoPvPCommandOptions>(r) ?? new AutoPvPCommandOptions());
                reader.ReadBlock(r => Profiles = r.ReadTypeCreate <AutoPvPProfileOptions>(r) ?? new AutoPvPProfileOptions());
                reader.ReadBlock(r => Seasons  = r.ReadTypeCreate <AutoPvPSeasonOptions>(r) ?? new AutoPvPSeasonOptions());
            }
            break;
            }

            if (Misc == null)
            {
                Misc = new AutoPvPMiscOptions();
            }
        }