public void StartSearch() { _selectedStart = null; var filtered = StartSearchService.Filter(_startText); if (_selectedEnd != null) { filtered.ToList().RemoveAll(x => ((Point)x.Item).RiverId != ((Point)_selectedEnd.Item).RiverId); } FilteredStart = filtered; }
public void EndSearch() { _selectedEnd = null; var filtered = StartSearchService.Filter(_endText); if (_selectedStart != null) { //todo: convert thESE to linq?? //todo: fix thisssssss filtered.ToList().RemoveAll(x => ((Point)x.Item).RiverId != ((Point)_selectedStart.Item).RiverId); } FilteredEnd = filtered; }