var tasks = commands.Select(async c => { var result = await c.CheckPreconditionsAsync(context, provider).ConfigureAwait(false); return new { Command = c, PreconditionResult = result }; });
var results = await Task.WhenAll(tasks);
foreach (var result in results)
{
var result = await command.CheckPreconditionsAsync(context, provider).ConfigureAwait(false);