private bool NotRecentlyProcessed(CommentChildData comment) { if (comment == null) { throw new ArgumentNullException(nameof(comment)); } return(!RecentCommentsIds.Contains(comment.Id)); }
private void ProcessComment(CommentChildData comment) { // TEMPORARY MEASURE!! REMOVE IN FINAL!!! Console.WriteLine($"{comment.Author} : {comment.Id}"); Console.WriteLine(); RecentCommentsIds.Enqueue(comment.Id); }
private bool ContainsWordMatch(CommentChildData comment, out WordDetectorResult result) { if (comment == null) { throw new ArgumentNullException(nameof(comment)); } // Assign a value to result to return. result = default; var match = WordDetector.Detect(comment.Body); bool containsWordMatch = match.TotalMatches > 0; if (containsWordMatch) { result = match; } return(containsWordMatch); }