private async Task ProcessFolder(string folder) { IEnumerable <string> folders = await _directoryReader.GetFoldersAsync(folder); foreach (var f in folders) { _folderQueue.Enqueue(f); } var files = await _directoryReader.GetFilesAsync(folder); foreach (var f in files) { string result; if (_processor.TryProcess(f, out result)) { _writer.WriteLine(result); } } }