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); }
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); }
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); }
public void FillSquadData(SquadNotificationDto data) { data.Quantity = value; }