public int DoSearch() { int before = _watchList.Count; _watchList = _compareTo switch { Compare.Previous => ComparePrevious(_watchList).ToList(), Compare.SpecificValue => CompareSpecificValue(_watchList).ToList(), Compare.SpecificAddress => CompareSpecificAddress(_watchList).ToList(), Compare.Changes => CompareChanges(_watchList).ToList(), Compare.Difference => CompareDifference(_watchList).ToList(), _ => ComparePrevious(_watchList).ToList() }; if (_settings.PreviousType == PreviousType.LastSearch) { SetPreviousToCurrent(); } if (UndoEnabled) { _history.AddState(_watchList.ToList()); } return(before - _watchList.Count); }
public int DoSearch() { int before = _watchList.Count; switch (_compareTo) { default: case Compare.Previous: _watchList = ComparePrevious(_watchList).ToList(); break; case Compare.SpecificValue: _watchList = CompareSpecificValue(_watchList).ToList(); break; case Compare.SpecificAddress: _watchList = CompareSpecificAddress(_watchList).ToList(); break; case Compare.Changes: _watchList = CompareChanges(_watchList).ToList(); break; case Compare.Difference: _watchList = CompareDifference(_watchList).ToList(); break; } if (_settings.PreviousType == PreviousType.LastSearch) { SetPreviousToCurrent(); } if (UndoEnabled) { _history.AddState(_watchList); } return(before - _watchList.Count); }