public SearchSuggestionViewModel(ISearchCriteriaSuggestion searchCriteriaSuggestion, Action <SearchSuggestionViewModel> selectSuggestionAction) { IsFromHistory = false; IsKeyword = searchCriteriaSuggestion.IsKeyword; SuggestedText = searchCriteriaSuggestion.Suggestion; DeleteSuggestionCommand = new DelegateCommand(() => { // do nothing for suggestions not originating on history }); SelectSuggestionCommand = new DelegateCommand(() => selectSuggestionAction(this)); }
private bool Equals(ISearchCriteriaSuggestion other) => other.Suggestion.Equals(Suggestion, StringComparison.InvariantCulture) && other.IsKeyword == IsKeyword;