Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IList<Tuple<long, Guid, string>>[] batches = IDs
- .Select((v, i) => new { Value = v, Index = i })
- .GroupBy(x => x.Index / Constants.BatchSize)
- .Select(group => group.Select(x => x.Value).ToArray())
- .ToArray();
- for (int i = 0; i < batches.Length; i++)
- {
- foreach (var item in batches[i])
- {
- //SendToSprinterService(item);
- Console.WriteLine("Batch : {0} {1}", i, item);
- }
- Thread.Sleep(Constants.MillisecondsDelay);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement