Пример #1
0
 /// <summary>
 /// 默认构造
 ///     合并运行模式使用
 /// </summary>
 /// <param name="aqiManage"></param>
 /// <param name="srcUrls"></param>
 public AqiRunner(AqiManage aqiManage, Dictionary <string, ISrcUrl> srcUrls)
 {
     name     = "DefaultRunner";
     sugtlist = SrcUrlGroupTimer.BuildList(srcUrls);
     ias      = aqiManage.AqiSave;
     an       = aqiManage.AqiNote;
     ar       = aqiManage.AqiRetry;
 }
Пример #2
0
        /// <summary>
        /// 添加 数据源接口
        /// </summary>
        /// <param name="srcUrls">接口集合</param>
        public void AddSrcUrl(Dictionary <string, ISrcUrl> srcUrls)
        {
            //转为Timer集合
            Dictionary <string, SrcUrlGroupTimer> list = SrcUrlGroupTimer.BuildList(srcUrls);

            foreach (SrcUrlGroupTimer timer in list.Values)
            {
                Add(timer);
            }
        }