Example #1
0
        public void CalculateCommentScore(Comment comment)
        {
            if (comment == null)
            {
                return;
            }

            if (comment.Score == null)
            {
                comment.Score = new CommentScore {
                    CommentId = comment.Id
                };
            }

            comment.Score.Value = Rank.Confidence(comment.Upvotes, 0);
        }