Advertisement
Guest User

Untitled

a guest
Jan 15th, 2020
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.65 KB | None | 0 0
  1. IList<Tuple<long, Guid, string>>[] batches = IDs
  2.                     .Select((v, i) => new { Value = v, Index = i })
  3.                     .GroupBy(x => x.Index / Constants.BatchSize)
  4.                     .Select(group => group.Select(x => x.Value).ToArray())
  5.                     .ToArray();
  6.  
  7.             for (int i = 0; i < batches.Length; i++)
  8.             {
  9.                 foreach (var item in batches[i])
  10.                 {
  11.                     //SendToSprinterService(item);
  12.                     Console.WriteLine("Batch : {0} {1}", i, item);
  13.                 }
  14.  
  15.                 Thread.Sleep(Constants.MillisecondsDelay);
  16.                
  17.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement