public async void StartLoadProjectAsync(string projectPath)
            {
                projectPath = Path.GetFullPath(Path.Combine(solutionDirectory, projectPath));
                var projectName = Path.GetFileNameWithoutExtension(projectPath);

                using (completionTracker.TrackScope())
                {
                    var dispatcher = repo.AnalysisServices.TaskDispatcher;
                    var services   = repo.AnalysisServices;
                    var logger     = repo.AnalysisServices.Logger;

                    string languageName = projectPath.EndsWith(".csproj") ? LanguageNames.CSharp : LanguageNames.VisualBasic;
                    string argsName     = languageName == LanguageNames.CSharp ? "csc.args.txt" : "vbc.args.txt";
                    string argsPath     = Path.Combine(extractionDirectory, projectName, argsName);
                    if (!File.Exists(argsPath))
                    {
                        return;
                    }

                    ProjectInfoBuilder info = null;

                    await dispatcher.Invoke(() =>
                    {
                        var args = File.ReadAllLines(argsPath);

                        ProjectInfo projectInfo = GetCommandLineProject(projectPath, projectName, languageName, args);
                        var assemblyName        = Path.GetFileNameWithoutExtension(projectInfo.OutputFilePath);
                        info             = GetProjectInfo(assemblyName);
                        info.ProjectInfo = projectInfo;
                    });
                }
            }
Esempio n. 2
0
 public CompletionTracker.CompletionHandle TrackScope()
 {
     return(tracker.TrackScope());
 }