Beispiel #1
0
        public ParallelTaskResult Execute()
        {
            ParallelTaskResult result = new ParallelTaskResult();

            OnExecuting(result);
            if (result.Status == ExecutionStatus.OK)
            {
                ExecuteCore(result);
            }
            OnExecuted(result);

            return(result);
        }
Beispiel #2
0
 protected virtual void OnExecuted(ParallelTaskResult result)
 {
 }
Beispiel #3
0
 protected abstract void ExecuteCore(ParallelTaskResult result);
Beispiel #4
0
 public virtual void OnException(ParallelTaskResult result, AggregateException ex)
 {
     result.Status    = ExecutionStatus.Error;
     result.Exception = ex;
 }
Beispiel #5
0
 protected override void ExecuteCore(ParallelTaskResult result)
 {
     _callback(_tState);
 }