@@ -33,8 +33,6 @@ public interface ITask : IAsyncResult
3333 ITask Start ( TaskScheduler scheduler ) ;
3434 ITask Progress ( Action < IProgress > progressHandler ) ;
3535
36- void Wait ( ) ;
37- bool Wait ( int milliseconds ) ;
3836 bool Successful { get ; }
3937 string Errors { get ; }
4038 Task Task { get ; }
@@ -373,16 +371,6 @@ protected TaskBase GetTopMostTask(TaskBase ret, bool onlyCreatedState)
373371 return depends . GetTopMostTask ( ret , onlyCreatedState ) ;
374372 }
375373
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-
386374 protected virtual void Run ( bool success )
387375 {
388376 }
@@ -443,8 +431,8 @@ protected Exception GetThrownException()
443431
444432 if ( DependsOn . Task . Status == TaskStatus . Faulted )
445433 {
446- var exception = DependsOn . Task . Exception ;
447- return exception ? . InnerException ?? exception ;
434+ var ex = DependsOn . Task . Exception ;
435+ return ex ? . InnerException ?? ex ;
448436 }
449437 return DependsOn . GetThrownException ( ) ;
450438 }
@@ -707,33 +695,6 @@ protected void RaiseOnData(TData data)
707695 }
708696 }
709697
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-
737698 public enum TaskAffinity
738699 {
739700 Concurrent ,
0 commit comments