Example #1
0
 /// <summary>
 /// 重写以实现任务停止前的任务
 /// </summary>
 /// <param name="context">任务上下文</param>
 protected virtual void OnStopping(TaskContext context)
 {
 }
Example #2
0
 protected virtual TaskResult CanRun(TaskContext context)
 {
     return(TaskResult.Success);
 }
Example #3
0
 /// <summary>
 /// 获取当前任务步骤序号
 /// </summary>
 /// <param name="context">任务上下文</param>
 /// <returns>返回当前所在步骤序号</returns>
 protected abstract int GetStepIndex(TaskContext context);
Example #4
0
 protected TaskBase(TaskContext context)
 {
     TaskContext = context;
 }