PageRenderTime 43ms CodeModel.GetById 17ms 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
Possible License(s): LGPL-2.1, Apache-2.0, BSD-3-Clause
  1. namespace 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. /// <summary>
  11. /// Gets a value indicating whether the comment should be passed to
  12. /// the next custom filter
  13. /// </summary>
  14. /// <returns>True if next filter should run</returns>
  15. bool FallThrough { get; }
  16. #endregion
  17. #region Public Methods
  18. /// <summary>
  19. /// Check if comment is spam
  20. /// </summary>
  21. /// <param name="comment">
  22. /// BlogEngine comment
  23. /// </param>
  24. /// <returns>
  25. /// True if comment is spam
  26. /// </returns>
  27. bool Check(Comment comment);
  28. /// <summary>
  29. /// Initializes anti-spam service
  30. /// </summary>
  31. /// <returns>
  32. /// True if service online and credentials validated
  33. /// </returns>
  34. bool Initialize();
  35. /// <summary>
  36. /// Report mistakes back to service
  37. /// </summary>
  38. /// <param name="comment">
  39. /// BlogEngine comment
  40. /// </param>
  41. void Report(Comment comment);
  42. #endregion
  43. }
  44. }