private ReaderWriterLockSlim thisLock; //读写锁 #endregion Fields #region Constructors public AqiManage() { thisLock = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion); allDLLs = new List<Assembly>(); InitDll(); allAqiWebs = new Dictionary<string, IAqiWeb>(); InitAqiWeb(); allSrcUrls = new Dictionary<string, ISrcUrl>(); InitSrcUrl(); initSaver(); //aqiSaver = new AqiFileSaver(this); aqiNoter = new AqiNoter(this); //目前默认为一个Retryer aqiRetryer = new AqiRetryer(this); initRunner(); //目前默认为一个Runner //aqiRunner = new AqiRunner(this, allSrcUrls); //aqiRunner.RunEvent += new AqiRunner.RunEventHandler(aqiRunner_RunEvent); }
/// <summary> /// 一般构造 /// 独立运行模式使用 /// </summary> /// <param name="aqiManage"></param> /// <param name="srcUrls"></param> /// <param name="strName">名称一般同 数据源TAG</param> public AqiRunner(AqiManage aqiManage, Dictionary<string, ISrcUrl> srcUrls, string strName) { name = strName; sugtlist = SrcUrlGroupTimer.BuildList(srcUrls); ias = aqiManage.AqiSave; an = aqiManage.AqiNote; ar = aqiManage.AqiRetry; }
/// <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; }