/// <summary> /// Removes a specialist /// </summary> /// <param name="specialist">The specialist to remove</param> public bool RemoveSpecialist(Specialist specialist) { if (_specialists.Contains(specialist)) { _specialists.Remove(specialist); OnRemoveSpecialist?.Invoke(this, new OnRemoveSpecialistEventArgs() { RemovedSpecialist = specialist, RemovedFrom = this, }); return(true); } return(false); }
/// <summary> /// Removes a list of specialsits /// </summary> /// <param name="specialists">The list of specialists to remove</param> public int RemoveSpecialists(List <Specialist> specialists) { var removedSpecialists = 0; foreach (Specialist s in specialists) { if (_specialists.Contains(s)) { removedSpecialists++; _specialists.Remove(s); OnRemoveSpecialist?.Invoke(this, new OnRemoveSpecialistEventArgs() { RemovedSpecialist = s, RemovedFrom = this, }); } } return(removedSpecialists); }