internal TaskThread(ScheduleTask sTask) { if (sTask == null) { throw new ArgumentNullException("sTask"); } this.Seconds = sTask.Seconds; this.sTask = sTask; }
/// <summary> /// 后期使用xml或二进制存储,用户界面添加任务 /// </summary> public void CreateScheduleTasks() { ScheduleTask st1 = new ScheduleTask() { Seconds = 2, Type = "HighAvaNoDb.Tasks.Monitor.CacheMonitorTask", //装箱 Parameters = new Dictionary <string, object>() { { "host", "127.0.0.1" }, { "port", 355 } } }; scheduleTasks.Add(st1.Name, st1); }