Ejemplo n.º 1
0
 public static void StoreInQueue <T>(
     IImmutableList <T> data,
     IAsyncCollector <T> queueCollector,
     ILogger log,
     Func <T, string> logTrace)
 {
     data.AsParallel().ForAll(x =>
     {
         log.LogInformation(logTrace(x));
         queueCollector.AddAsync(x);
     });
 }