protected TryExecuteTask ( System.Threading.Tasks.Task task ) : bool | ||
task | System.Threading.Tasks.Task | |
return | bool |
public void RunSynchronously(TaskScheduler scheduler) { if (this.Status != TaskStatus.Created) { throw new InvalidOperationException("The task is not in a valid state to be started"); } if (scheduler.TryExecuteTask(this)) { return; } Start(scheduler); Wait(); }