@@ -33,8 +33,6 @@ public interface ITask : IAsyncResult
33
33
ITask Start ( TaskScheduler scheduler ) ;
34
34
ITask Progress ( Action < IProgress > progressHandler ) ;
35
35
36
- void Wait ( ) ;
37
- bool Wait ( int milliseconds ) ;
38
36
bool Successful { get ; }
39
37
string Errors { get ; }
40
38
Task Task { get ; }
@@ -373,16 +371,6 @@ protected TaskBase GetTopMostTask(TaskBase ret, bool onlyCreatedState)
373
371
return depends . GetTopMostTask ( ret , onlyCreatedState ) ;
374
372
}
375
373
376
- public virtual void Wait ( )
377
- {
378
- Task . Wait ( Token ) ;
379
- }
380
-
381
- public virtual bool Wait ( int milliseconds )
382
- {
383
- return Task . Wait ( milliseconds , Token ) ;
384
- }
385
-
386
374
protected virtual void Run ( bool success )
387
375
{
388
376
}
@@ -443,8 +431,8 @@ protected Exception GetThrownException()
443
431
444
432
if ( DependsOn . Task . Status == TaskStatus . Faulted )
445
433
{
446
- var exception = DependsOn . Task . Exception ;
447
- return exception ? . InnerException ?? exception ;
434
+ var ex = DependsOn . Task . Exception ;
435
+ return ex ? . InnerException ?? ex ;
448
436
}
449
437
return DependsOn . GetThrownException ( ) ;
450
438
}
@@ -707,33 +695,6 @@ protected void RaiseOnData(TData data)
707
695
}
708
696
}
709
697
710
- static class TaskBaseExtensions
711
- {
712
- public static T Schedule < T > ( this T task , ITaskManager taskManager )
713
- where T : ITask
714
- {
715
- return taskManager . Schedule ( task ) ;
716
- }
717
-
718
- public static T ScheduleUI < T > ( this T task , ITaskManager taskManager )
719
- where T : ITask
720
- {
721
- return taskManager . ScheduleUI ( task ) ;
722
- }
723
-
724
- public static T ScheduleExclusive < T > ( this T task , ITaskManager taskManager )
725
- where T : ITask
726
- {
727
- return taskManager . ScheduleExclusive ( task ) ;
728
- }
729
-
730
- public static T ScheduleConcurrent < T > ( this T task , ITaskManager taskManager )
731
- where T : ITask
732
- {
733
- return taskManager . ScheduleConcurrent ( task ) ;
734
- }
735
- }
736
-
737
698
public enum TaskAffinity
738
699
{
739
700
Concurrent ,
0 commit comments