static IEnumerable <Task <string> > SourceTasks_pg_163_2() { Task <string> task1 = AsyncAndThreading.ReadFileAsync(false); Task <string> task2 = AsyncAndThreading.ReadFileAsync(false, @"C:\Users\Henrique-private\Desktop\demo2.txt"); Task <string> task3 = AsyncAndThreading.ReadFileAsync(false, @"C:\Users\Henrique-private\Desktop\demo3.txt"); List <Task <string> > tasksList = new List <Task <string> >(); tasksList.Add(task1); tasksList.Add(task2); tasksList.Add(task3); var tasksArray = tasksList.ToArray(); return(tasksArray); }
private static async Task <string> _157_AvoidRunningCtxAwareOnContextFree() { var res = await AsyncAndThreading.ReadFileAsync(true); return(res); }