⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 onlineuserrecorderfactory.cs

📁 C#编写的在线用户统计、在线编辑器、验证码图片
💻 CS
字号:
/* 
 * OnlineUserRecorderFactory.cs @Microsoft Visual Studio 2008 <.NET Framework 2.0 (or Higher)>
 * AfritXia
 * 2008-03-06
 * 
 * Copyright(c) http://www.AfritXia.NET/
 * 
 */

using System;

namespace Net.AfritXia.Web.OnlineStat
{
    /// <summary>
    /// 在线用户记录器工厂类
    /// </summary>
    public sealed class OnlineUserRecorderFactory
    {
        // 用户超时分钟数
        private int m_userTimeOutMinute = 20;
        // 统计时间间隔
        private int m_statisticEventInterval = 60;

        #region 类构造器
        /// <summary>
        /// 类默认构造器
        /// </summary>
        public OnlineUserRecorderFactory()
        {
        }
        #endregion

        /// <summary>
        /// 设置或获取用户超时分钟数
        /// </summary>
        public int UserTimeOutMinute
        {
            set
            {
                this.m_userTimeOutMinute = value;
            }

            get
            {
                return this.m_userTimeOutMinute;
            }
        }

        /// <summary>
        /// 设置或获取统计时间间隔(单位秒)
        /// </summary>
        public int StatisticEventInterval
        {
            set
            {
                this.m_statisticEventInterval = value;
            }

            get
            {
                return this.m_statisticEventInterval;
            }
        }

        /// <summary>
        /// 创建在线用户记录器
        /// </summary>
        /// <returns></returns>
        public OnlineUserRecorder Create()
        {
            OnlineUserRecorder recorder = null;

            // 创建在线用户记录器
            recorder = new OnlineUserRecorder();

            // 设置超时分钟数
            recorder.UserTimeOutMinute = this.UserTimeOutMinute;
            // 统计时间间隔
            recorder.StatisticEventInterval = this.StatisticEventInterval;

            return recorder;
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -