PageRenderTime 52ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/BlogEngine/BlogEngine.NET/App_Code/Extensions/Recaptcha/RecaptchaLogItem.cs

#
C# | 102 lines | 28 code | 15 blank | 59 comment | 0 complexity | fddcc4e0421e845c96edda41ee4e637b MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0, BSD-3-Clause
  1. // Copyright (c) 2007 Adrian Godong, Ben Maurer
  2. // Permission is hereby granted, free of charge, to any person obtaining a copy
  3. // of this software and associated documentation files (the "Software"), to deal
  4. // in the Software without restriction, including without limitation the rights
  5. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  6. // copies of the Software, and to permit persons to whom the Software is
  7. // furnished to do so, subject to the following conditions:
  8. // The above copyright notice and this permission notice shall be included in
  9. // all copies or substantial portions of the Software.
  10. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  11. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  12. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  13. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  14. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  15. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  16. // THE SOFTWARE.
  17. // Adapted for dotnetblogengine by Filip Stanek ( http://www.bloodforge.com )
  18. namespace Recaptcha
  19. {
  20. using System;
  21. /// <summary>
  22. /// Recaptcha Log Item
  23. /// </summary>
  24. [Serializable]
  25. public class RecaptchaLogItem
  26. {
  27. #region Constructors and Destructors
  28. /// <summary>
  29. /// Initializes a new instance of the <see cref = "RecaptchaLogItem" /> class.
  30. /// </summary>
  31. public RecaptchaLogItem()
  32. {
  33. this.Response = String.Empty;
  34. this.Necessary = true;
  35. this.Enabled = true;
  36. this.CommentId = Guid.Empty;
  37. this.Challenge = String.Empty;
  38. }
  39. #endregion
  40. #region Properties
  41. /// <summary>
  42. /// Gets or sets the challenge.
  43. /// </summary>
  44. /// <value>The challenge.</value>
  45. public string Challenge { get; set; }
  46. /// <summary>
  47. /// Gets or sets the comment id.
  48. /// </summary>
  49. /// <value>The comment id.</value>
  50. public Guid CommentId { get; set; }
  51. /// <summary>
  52. /// Gets or sets a value indicating whether this <see cref = "RecaptchaLogItem" /> is enabled.
  53. /// </summary>
  54. /// <value><c>true</c> if enabled; otherwise, <c>false</c>.</value>
  55. public bool Enabled { get; set; }
  56. /// <summary>
  57. /// Gets or sets a value indicating whether this <see cref = "RecaptchaLogItem" /> is necessary.
  58. /// </summary>
  59. /// <value><c>true</c> if necessary; otherwise, <c>false</c>.</value>
  60. public bool Necessary { get; set; }
  61. /// <summary>
  62. /// Gets or sets the number of attempts.
  63. /// </summary>
  64. /// <value>The number of attempts.</value>
  65. public ushort NumberOfAttempts { get; set; }
  66. /// <summary>
  67. /// Gets or sets the response.
  68. /// </summary>
  69. /// <value>The response.</value>
  70. public string Response { get; set; }
  71. /// <summary>
  72. /// Gets or sets the time to comment.
  73. /// </summary>
  74. /// <remarks>
  75. /// in seconds - this is the time from the initial page load until a captcha was successfully solved
  76. /// </remarks>
  77. public double TimeToComment { get; set; }
  78. /// <summary>
  79. /// Gets or sets the time to solve capcha.
  80. /// </summary>
  81. /// <remarks>
  82. /// in seconds - this is the time from the last time the captcha was refreshed until it was successfully solved.
  83. /// </remarks>
  84. public double TimeToSolveCapcha { get; set; }
  85. #endregion
  86. }
  87. }