/// <summary> /// Добавить сопровождающего иностранца-участника /// </summary> /// <param name="foreignParticipant">Иностранный участник</param> internal void AddForeignParticipant(ForeignParticipant foreignParticipant) { if (ForeignParticipants.Any(fp => fp.Id == foreignParticipant.Id)) { return; } ForeignParticipants.Add(foreignParticipant); }
/// <summary> /// Добавить сопровождающих иностранцев-участников /// </summary> /// <param name="foreignParticipant">Инострацы участники</param> public void AddForeignParticipants(params ForeignParticipant[] foreignParticipants) { foreach (var foreignParticipant in foreignParticipants) { if (!ForeignParticipants.Any(fp => fp.Id == foreignParticipant.Id)) { ForeignParticipants.Add(foreignParticipant); } } }
/// <summary> /// Добавить сопровождающих иностранцев-участников /// </summary> /// <param name="foreignParticipant">Инострацы участники</param> internal void AddForeignParticipants(params ForeignParticipant[] foreignParticipants) { /*Contract.Argument.IsNotNull(foreignParticipants, nameof(foreignParticipants)); * Contract.Implementation.IsNotNull(ForeignParticipants, nameof(ForeignParticipants));*/ foreach (var foreignParticipant in foreignParticipants) { if (!ForeignParticipants.Any(fp => fp.Id == foreignParticipant.Id)) { ForeignParticipants.Add(foreignParticipant); } } }