public ExcelProject LoadStructureExcel(string pathFolder, ILogging logging) { var docFilesGetter = new ExcelDocsFilesNameGetter {LocationDirectory = pathFolder}; var siemensProjectLoader = new ExcelProjectLoader(docFilesGetter, logging); return siemensProjectLoader.LoadStructureProject(); }
public void ReloadFiles(string pathFolder) { var docFilesGetter = new ExcelDocsFilesNameGetter {LocationDirectory = pathFolder}; var taskList = new List<Task>(); var list = _drawingsDataManager.GetListCollection(); foreach (var drawing in list) { drawing.Files = docFilesGetter.GetFilesByNameDrawing(drawing.Designation).Select(x => new UppyFileInfo() {FileName = x}).ToList(); taskList.Add(_factory.StartNew(() => { LoadFiles(drawing, list); })); } Task.WaitAll(taskList.ToArray()); foreach (var drawing in list) { _drawingsDataManager.Update(drawing); } }