using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace IStation.Server { /// /// 任务辅助类 /// public class JobHelper { private List _jobHelpers = new List() { new CustomCronServiceJobHelper(), new CustomRealServiceJobHelper() }; /// /// /// public void StartJob() { _jobHelpers.ForEach(async x => await x.StartJob()); } /// /// /// public void CancelJob() { _jobHelpers.ForEach(async x => await x.CancelJob()); } } }