public static SystemTasks.Task <TResult> Unwrap <TResult>( this SystemTasks.Task <SystemTasks.Task <TResult> > task) { var runtime = CoyoteRuntime.Current; if (runtime.SchedulingPolicy is SchedulingPolicy.None) { return(SystemTasks.TaskExtensions.Unwrap(task)); } return(runtime.UnwrapTask(task)); }
public static SystemTasks.Task <TResult> Unwrap <TResult>( this SystemTasks.Task <SystemTasks.Task <TResult> > task) => CoyoteRuntime.IsExecutionControlled ? CoyoteRuntime.Current.UnwrapTask(task) : SystemTasks.TaskExtensions.Unwrap(task);