public void SelectCohorts(ISpeciesCohorts cohorts, ISpeciesCohortBoolArray isHarvested) { int i = 0; foreach (ICohort cohort in cohorts) { if (ages.Contains(cohort.Age)) isHarvested[i] = true; else { foreach (AgeRange range in ranges) { if (range.Contains(cohort.Age)) { isHarvested[i] = true; break; } } } i++; } } }
//--------------------------------------------------------------------- private void SelectCohorts(ISpeciesCohorts cohorts, SpecificAgesCohortSelector selector) { isHarvested.SetAllFalse(cohorts.Count); selector.SelectCohorts(cohorts, isHarvested); }