Пример #1
0
        public void FillSquadData(SquadNotificationDto data)
        {
            var armorDto = new ArmorNotificationDto
            {
                Defence = new List <DefenceNotificationDto>(),
                Tags    = new List <string>()
            };

            armorDto.Name = Name;
            defense.ForEach(offence => offence.FillArmorData(armorDto));
            armorDto.Tags = tags.Select(tag => tag.ToString()).ToList();
            data.Armors.Add(armorDto);
        }
Пример #2
0
        public void FillSquadData(SquadNotificationDto data)
        {
            var weaponDto = new WeaponNotificationDto
            {
                Offence = new List <OffenceNotificationDto>(),
                Tags    = new List <string>()
            };

            weaponDto.Name = Name;
            offence.ForEach(offence => offence.FillWeaponData(weaponDto));
            weaponDto.Tags = tags.Select(tag => tag.ToString()).ToList();
            data.Weapons.Add(weaponDto);
        }
Пример #3
0
        public void FillArmyData(ArmyNotificationDto armyData)
        {
            var squadData = new SquadNotificationDto
            {
                Weapons = new List <WeaponNotificationDto>(),
                Armors  = new List <ArmorNotificationDto>(),
                Tags    = new List <string>()
            };

            squadData.Type = Type;
            weapons.ForEach(weapon => weapon.FillSquadData(squadData));
            armors.ForEach(armor => armor.FillSquadData(squadData));
            quantity.FillSquadData(squadData);
            squadData.Tags = tags.Select(tag => tag.ToString()).ToList();
            armyData.Squads.Add(squadData);
        }
Пример #4
0
 public void FillSquadData(SquadNotificationDto data)
 {
     data.Quantity = value;
 }