Пример #1
0
        /// <summary>
        /// 运行
        /// </summary>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        public async Task Run(CancellationToken cancellationToken)
        {
            string runnerName = typeof(TRunner).Name;

            Info($"[{runnerName}]管道初始化...");
            while (ServiceContext.IsDoneLoad)
            {
                Thread.Sleep(1000);
            }
            Info($"[{runnerName}]管道初始化完成...");

            Info($"[{runnerName}]程序初始化...");
            Logger        = ServiceContext.Resolve <ILogger <TRunner> >();
            RunningStatus = Enum_Process.Waiting;
            Init();
            Info($"[{runnerName}]程序初始化完成...");

            Info($"[{runnerName}]程序开始运行...");
            Execute(cancellationToken);
        }
Пример #2
0
 /// <summary>
 /// 更新状态
 /// </summary>
 /// <param name="eProcess"></param>
 protected virtual void UpdateStatus(Enum_Process eProcess)
 {
 }