This repository was archived by the owner on Dec 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -25,11 +25,11 @@ public ITask Queue(ITask task)
2525 return this ;
2626 }
2727
28- public override ITask Start ( )
28+ protected override void Run ( )
2929 {
3030 foreach ( var task in queuedTasks )
3131 task . Start ( ) ;
32- return base . Start ( ) ;
32+ base . Run ( ) ;
3333 }
3434
3535 private void TaskFinished ( ITask task , bool success , Exception ex )
Original file line number Diff line number Diff line change @@ -299,14 +299,14 @@ public ITask Progress(Action<IProgress> handler)
299299 return this ;
300300 }
301301
302- public virtual ITask Start ( )
302+ public ITask Start ( )
303303 {
304304 var depends = GetTopMostTaskInCreatedState ( ) ?? this ;
305305 depends . Run ( ) ;
306306 return this ;
307307 }
308308
309- protected void Run ( )
309+ protected virtual void Run ( )
310310 {
311311 if ( Task . Status == TaskStatus . Created )
312312 {
@@ -540,6 +540,11 @@ protected TaskBase(CancellationToken token)
540540
541541 protected TaskBase ( Task < TResult > task )
542542 : base ( )
543+ {
544+ Initialize ( task ) ;
545+ }
546+
547+ protected void Initialize ( Task < TResult > task )
543548 {
544549 Task = new Task < TResult > ( t =>
545550 {
You can’t perform that action at this time.
0 commit comments