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);
        }
Beispiel #2
0
        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);
        }