예제 #1
0
 public static SubscribeTimerWorkerLog GetInstance()
 {
     if (_instance == null)
     {
         _instance = new SubscribeTimerWorkerLog();
     }
     return(_instance);
 }
예제 #2
0
        /// <summary>
        /// 执行程式
        /// </summary>
        /// <param name="state"></param>
        public void DoWork(object state)
        {
            //SubscribeTimerWorker obj = (SubscribeTimerWorker)state;

            //记录开始时间
            DateTime dtStart = DateTime.Now;

            //**** 读取 上次处理完成的时间
            DateTime lastEndDate = SubscribeTimerWorkerLog.GetInstance().ReadLastEndDate();

            //do work
            dal.SubscribeSend(lastEndDate);

            //记录结束时间
            DateTime dtEnd = DateTime.Now;

            //记录
            SubscribeTimerWorkerLog.GetInstance().Write(dtStart, dtEnd);
        }
 public static SubscribeTimerWorkerLog GetInstance()
 {
     if (_instance == null)
         _instance = new SubscribeTimerWorkerLog();
     return _instance;
 }