Пример #1
0
        public void Run()
        {
            _alert("开启检测!");
            _cts  = new CancellationTokenSource();
            Tasks = new List <Task>();
            //实时获取最新模板
            List <GameIndexTemplate> templates = ConfigRepository.GetCurrentTemplates();

            foreach (var template in templates)
            {
                //未启用
                if (!template.Enabled)
                {
                    continue;
                }
                var task = new Task(() => { Task(template); });
                Tasks.Add(task);
                task.Start();
            }
        }
Пример #2
0
 public Job(Action <string> alert, GameSetting setting)
 {
     _alert       = alert;
     _gameSetting = setting;
     ConfigRepository.ConfigInit(setting);
 }