Exemple #1
0
        public ITaskResult Run(StepGen stepGen, Input input)
        {
            this.Init(input);
            var task = new Task(this, stepGen.ToArray());
            var rst  = task.Run();

            if (rst.Status == Status.Error)
            {
                return(TaskResult.Fail(rst.Message, task.CodeLineCount, task.StepCount, Input.List, Output.List));
            }

            //if (Input.Any())
            //{
            //    return Result.Error("还有数据没有处理。");
            //}

            var count = Expect.Count;

            if (count > 0)
            {
                return(TaskResult.Fail($"还有 {count} 个数据没有输出。", task.CodeLineCount, task.StepCount, Input.List, Output.List));
            }

            return(TaskResult.OK(task.CodeLineCount, task.StepCount, Input.List, Output.List));
        }