public IEnumerable <Thing> FilthInCleaningAreas() { HashSet <Thing> hashSet = new HashSet <Thing>(); for (int i = 0; i < priorityList.Count; i++) { foreach (Thing filth in areaFilthLister.GetFilthInAreaEnumerator(priorityList[i])) { hashSet.Add(filth); } } return(hashSet); }
public IEnumerable <Thing> FilthInCleaningAreas() { var hashSet = new HashSet <Thing>(); foreach (var area in priorityList) { foreach (var filth in areaFilthLister.GetFilthInAreaEnumerator(area)) { hashSet.Add(filth); } } return(hashSet); }