C# Класс Subtext.Framework.CommentFilter

Class used to filter incoming comments. This will get replaced with a plugin once the plugin architecture is complete, but the logic will probably get ported.
Наследование: ICommentFilter
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ClearCommentCache ( ) : void

Clears the comment cache.

CommentFilter ( Cache cache ) : System

Initializes a new instance of the CommentFilter class.

FilterAfterPersist ( FeedbackItem feedbackItem ) : void

Filters the comment. Throws an exception should the comment not be allowed. Otherwise returns true. This interface may be changed.

The first filter examines whether comments are coming in too quickly from the same SourceUrl. Looks at the BlogInfo.CommentDelayInMinutes.

The second filter checks for duplicate comments. It only looks at the body of the comment.

FilterBeforePersist ( FeedbackItem feedback ) : void

Validates the feedback before it has been persisted.

Приватные методы

Метод Описание
FlagAsSpam ( FeedbackItem feedbackItem ) : void
IsDuplicateComment ( FeedbackItem feedbackItem ) : bool
SourceFrequencyIsValid ( FeedbackItem feedbackItem ) : bool

Описание методов

ClearCommentCache() публичный Метод

Clears the comment cache.
public ClearCommentCache ( ) : void
Результат void

CommentFilter() публичный Метод

Initializes a new instance of the CommentFilter class.
public CommentFilter ( Cache cache ) : System
cache Cache
Результат System

FilterAfterPersist() публичный Метод

Filters the comment. Throws an exception should the comment not be allowed. Otherwise returns true. This interface may be changed.

The first filter examines whether comments are coming in too quickly from the same SourceUrl. Looks at the BlogInfo.CommentDelayInMinutes.

The second filter checks for duplicate comments. It only looks at the body of the comment.

public FilterAfterPersist ( FeedbackItem feedbackItem ) : void
feedbackItem Subtext.Framework.Components.FeedbackItem Entry.
Результат void

FilterBeforePersist() публичный Метод

Validates the feedback before it has been persisted.
Thrown if too many comments are received from the same source in a short period. Thrown if the blog does not allow duplicate comments and too many are received in a short period of time.
public FilterBeforePersist ( FeedbackItem feedback ) : void
feedback Subtext.Framework.Components.FeedbackItem
Результат void