PageRenderTime 56ms CodeModel.GetById 49ms app.highlight 3ms RepoModel.GetById 2ms 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
  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
 18// Adapted for dotnetblogengine by Filip Stanek ( http://www.bloodforge.com )
 19
 20namespace Recaptcha
 21{
 22    using System;
 23
 24    /// <summary>
 25    /// Recaptcha Log Item
 26    /// </summary>
 27    [Serializable]
 28    public class RecaptchaLogItem
 29    {
 30        #region Constructors and Destructors
 31
 32        /// <summary>
 33        ///     Initializes a new instance of the <see cref = "RecaptchaLogItem" /> class.
 34        /// </summary>
 35        public RecaptchaLogItem()
 36        {
 37            this.Response = String.Empty;
 38            this.Necessary = true;
 39            this.Enabled = true;
 40            this.CommentId = Guid.Empty;
 41            this.Challenge = String.Empty;
 42        }
 43
 44        #endregion
 45
 46        #region Properties
 47
 48        /// <summary>
 49        ///     Gets or sets the challenge.
 50        /// </summary>
 51        /// <value>The challenge.</value>
 52        public string Challenge { get; set; }
 53
 54        /// <summary>
 55        ///     Gets or sets the comment id.
 56        /// </summary>
 57        /// <value>The comment id.</value>
 58        public Guid CommentId { get; set; }
 59
 60        /// <summary>
 61        ///     Gets or sets a value indicating whether this <see cref = "RecaptchaLogItem" /> is enabled.
 62        /// </summary>
 63        /// <value><c>true</c> if enabled; otherwise, <c>false</c>.</value>
 64        public bool Enabled { get; set; }
 65
 66        /// <summary>
 67        ///     Gets or sets a value indicating whether this <see cref = "RecaptchaLogItem" /> is necessary.
 68        /// </summary>
 69        /// <value><c>true</c> if necessary; otherwise, <c>false</c>.</value>
 70        public bool Necessary { get; set; }
 71
 72        /// <summary>
 73        ///     Gets or sets the number of attempts.
 74        /// </summary>
 75        /// <value>The number of attempts.</value>
 76        public ushort NumberOfAttempts { get; set; }
 77
 78        /// <summary>
 79        ///     Gets or sets the response.
 80        /// </summary>
 81        /// <value>The response.</value>
 82        public string Response { get; set; }
 83
 84        /// <summary>
 85        ///     Gets or sets the time to comment.
 86        /// </summary>
 87        /// <remarks>
 88        ///     in seconds - this is the time from the initial page load until a captcha was successfully solved
 89        /// </remarks>
 90        public double TimeToComment { get; set; }
 91
 92        /// <summary>
 93        ///     Gets or sets the time to solve capcha.
 94        /// </summary>
 95        /// <remarks>
 96        ///     in seconds - this is the time from the last time the captcha was refreshed until it was successfully solved.
 97        /// </remarks>
 98        public double TimeToSolveCapcha { get; set; }
 99
100        #endregion
101    }
102}