PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/BlogEngine/DotNetSlave.BusinessLogic/ICustomFilter.cs

#
C# | 51 lines | 14 code | 7 blank | 30 comment | 0 complexity | e05ef93c549d7a085cd03e20fae1558e MD5 | raw file
 1namespace BlogEngine.Core
 2{
 3    /// <summary>
 4    /// An interface implemented by anti-spam 
 5    ///     services like Waegis, Akismet etc.
 6    /// </summary>
 7    public interface ICustomFilter
 8    {
 9        #region Properties
10
11        /// <summary>
12        ///     Gets a value indicating whether the comment should be passed to
13        ///     the next custom filter
14        /// </summary>
15        /// <returns>True if next filter should run</returns>
16        bool FallThrough { get; }
17
18        #endregion
19
20        #region Public Methods
21
22        /// <summary>
23        /// Check if comment is spam
24        /// </summary>
25        /// <param name="comment">
26        /// BlogEngine comment
27        /// </param>
28        /// <returns>
29        /// True if comment is spam
30        /// </returns>
31        bool Check(Comment comment);
32
33        /// <summary>
34        /// Initializes anti-spam service
35        /// </summary>
36        /// <returns>
37        /// True if service online and credentials validated
38        /// </returns>
39        bool Initialize();
40
41        /// <summary>
42        /// Report mistakes back to service
43        /// </summary>
44        /// <param name="comment">
45        /// BlogEngine comment
46        /// </param>
47        void Report(Comment comment);
48
49        #endregion
50    }
51}