示例#1
0
        private bool ProcessBatch(TranslationJob job)
        {
            if (translatedJobsList.Where(x => x.LineNumber == BatchLineNumber).Count() == translationObjectsList.Count)
            {
                List <TranslationJob> completedJobs = translatedJobsList.Where(x => x.LineNumber == BatchLineNumber).OrderBy(y => y.TranslatedWord).ToList();

                string batchedResult = string.Empty;

                foreach (TranslationJob j in completedJobs)
                {
                    batchedResult += j.TranslatedWord + System.Environment.NewLine;
                    translatedJobsList.Remove(j);
                }
                WriteBatch(batchedResult);
                BatchLineNumber++;
            }
            return(true);
        }