Exemplo n.º 1
0
 public void ProcessAllItems(string username, string password, int threadCount, Action <string, Exception> callback)
 {
     var formattedPassword     = m_communicationProvider.GetFormattedPasswordAsAuthToken(password);
     ParallelLoopResult result = Parallel.ForEach(m_files,
                                                  new ParallelOptions {
         MaxDegreeOfParallelism = threadCount
     },
                                                  model => ProcessFile(model, username, formattedPassword, callback));
 }