Пример #1
0
 private void OnExamItemEnd(ExamItemEndMessage message)
 {
     if (ExamItems != null)
     {
         var items = ExamItems.Where(x => x.ItemCode == message.ExamItemCode).ToArray();
         foreach (var examItem in items)
         {
             examItem.StopAsync();
         }
     }
 }
Пример #2
0
        private void ExecuteExamItems(CarSignalInfo signalInfo)
        {
            var activedItems = ExamItems.Where(x => x.State == ExamItemState.Progressing).ToArray();

            foreach (var examItem in activedItems.OrderBy(x => x.Order))
            {
                try
                {
                    examItem.Execute(signalInfo);
                }
                catch (Exception exp)
                {
                    Logger.ErrorFormat("接收到信号后执行考试项目{0}发生异常,原因:{1}", examItem.ItemCode, exp, exp);
                }
            }
        }