internal static async Task RunAll(IEnumerable <IBackgourndTask> tasks) { await Task.WhenAll(tasks.Select(async t => { try { await TaskExecution.Run(t); } catch (Exception ex) { Log.For <ExecutionEngine>().Error(ex, $"Failed to run background task : {t.Name} because : " + ex.ToFullMessage()); } })); }
internal static Task RunAll(IEnumerable <IBackgourndTask> tasks) => Task.WhenAll(tasks.Select(t => TaskExecution.Run(t)));