Advertisement
LaughingMan

Untitled

Aug 20th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.57 KB | None | 0 0
  1. ublic static void ProcessFileGroup(IGrouping<string, FileInfo> fileGroup)
  2.         {
  3.             try
  4.             {
  5.                 Console.Write($"\rNow handling {fileGroup.Key} files\t\t\t\t\t");
  6.  
  7.                 //Parallel.ForEach(fileGroup, ProcessFile);
  8.                 //Parallel.ForEach(fileGroup, ProcessFileAsync);
  9.  
  10.                 foreach (FileInfo file in fileGroup)
  11.                 {
  12.                     //ProcessFile(file);
  13.                     ProcessFileAsync(file);
  14.                 }
  15.  
  16.                 Console.Write($"\r{DateTime.Now} | {fileGroup.Key} has finished parsing\t\t\t\t\t");
  17.             }
  18.             catch (Exception e)
  19.             {
  20.                 Console.WriteLine($"\r\n{e.Message}\r\n{e}");
  21.                 throw;
  22.             }
  23.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement