Esempio n. 1
0
 public Task Go(ProcessingContext context)
 {
     return(Parallel.ForEachAsync(context.Bots, async(bot, _) =>
     {
         await _botProcessingFactory.Process(bot, context);
     }));
 }
Esempio n. 2
0
 public async Task Go(ProcessingContext context)
 {
     var botProcessing = context.Bots.Select(bot => _botProcessingFactory.Process(bot, context));
     await Task.WhenAll(botProcessing);
 }