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)
25
25
return this ;
26
26
}
27
27
28
- public override ITask Start ( )
28
+ protected override void Run ( )
29
29
{
30
30
foreach ( var task in queuedTasks )
31
31
task . Start ( ) ;
32
- return base . Start ( ) ;
32
+ base . Run ( ) ;
33
33
}
34
34
35
35
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)
299
299
return this ;
300
300
}
301
301
302
- public virtual ITask Start ( )
302
+ public ITask Start ( )
303
303
{
304
304
var depends = GetTopMostTaskInCreatedState ( ) ?? this ;
305
305
depends . Run ( ) ;
306
306
return this ;
307
307
}
308
308
309
- protected void Run ( )
309
+ protected virtual void Run ( )
310
310
{
311
311
if ( Task . Status == TaskStatus . Created )
312
312
{
@@ -540,6 +540,11 @@ protected TaskBase(CancellationToken token)
540
540
541
541
protected TaskBase ( Task < TResult > task )
542
542
: base ( )
543
+ {
544
+ Initialize ( task ) ;
545
+ }
546
+
547
+ protected void Initialize ( Task < TResult > task )
543
548
{
544
549
Task = new Task < TResult > ( t =>
545
550
{
You can’t perform that action at this time.
0 commit comments