/// <inheritdoc /> public bool MatchValue(T value) { bool match = ApplyPredicate(value); _history.CacheValue(value, match); return(match && //This value matches. _history.Matches + 1 >= _matchCount); //And with it we've reached the match count. }
/// <inheritdoc /> public bool MatchValue(T value) { //Register if this value triggers a match. bool isMatch = MatchWithNewValue(value); _history.CacheValue(value, isMatch); //Return true if the new match triggers the max. return(isMatch && _history.Matches + 1 >= _matchAmount); }