public Solution OpenFolder(string folderPath, SourceFileMatcher fileMatcher) { if (string.IsNullOrEmpty(folderPath) || !Directory.Exists(folderPath)) { throw new ArgumentException($"Folder '{folderPath}' does not exist.", nameof(folderPath)); } ClearSolution(); var solutionInfo = FolderSolutionLoader.LoadSolutionInfo(folderPath, fileMatcher); OnSolutionAdded(solutionInfo); return(CurrentSolution); }
public async Task <Solution> OpenFolder(string folderPath, Matcher fileMatcher, CancellationToken cancellationToken) { if (string.IsNullOrEmpty(folderPath) || !Directory.Exists(folderPath)) { throw new ArgumentException($"Folder '{folderPath}' does not exist.", nameof(folderPath)); } ClearSolution(); var solutionInfo = await FolderSolutionLoader.LoadSolutionInfoAsync(folderPath, fileMatcher, cancellationToken).ConfigureAwait(false); OnSolutionAdded(solutionInfo); return(CurrentSolution); }