async Task <ProjectCacheInfo> LoadProjectCacheInfo( MonoDevelop.Projects.Project p, DotNetProjectConfiguration config, string framework, CancellationToken token) { await TypeSystemService.SafeFreezeLoad().ConfigureAwait(false); if (token.IsCancellationRequested) { return(null); } var(references, projectReferences) = await metadataHandler.Value.CreateReferences(p, framework, token).ConfigureAwait(false); if (token.IsCancellationRequested) { return(null); } var configSelector = config?.Selector; if (p is MonoDevelop.Projects.DotNetProject && configSelector != null && !string.IsNullOrEmpty(framework)) { configSelector = new MonoDevelop.Projects.DotNetProjectFrameworkConfigurationSelector(config.Selector, framework); } await TypeSystemService.SafeFreezeLoad().ConfigureAwait(false); var sourceFiles = await p.GetSourceFilesAsync(configSelector).ConfigureAwait(false); if (token.IsCancellationRequested) { return(null); } await TypeSystemService.SafeFreezeLoad().ConfigureAwait(false); var analyzerFiles = await p.GetAnalyzerFilesAsync(configSelector).ConfigureAwait(false); return(new ProjectCacheInfo { AnalyzerFiles = analyzerFiles, SourceFiles = sourceFiles, ProjectReferences = projectReferences, References = references }); }
async Task <ProjectCacheInfo> LoadProjectCacheInfo(MonoDevelop.Projects.Project p, DotNetProjectConfiguration config, CancellationToken token) { await TypeSystemService.SafeFreezeLoad().ConfigureAwait(false); if (token.IsCancellationRequested) { return(null); } var(references, projectReferences) = await metadataHandler.Value.CreateReferences(p, token).ConfigureAwait(false); if (token.IsCancellationRequested) { return(null); } await TypeSystemService.SafeFreezeLoad().ConfigureAwait(false); var sourceFiles = await p.GetSourceFilesAsync(config?.Selector).ConfigureAwait(false); if (token.IsCancellationRequested) { return(null); } await TypeSystemService.SafeFreezeLoad().ConfigureAwait(false); var analyzerFiles = await p.GetAnalyzerFilesAsync(config?.Selector).ConfigureAwait(false); return(new ProjectCacheInfo { AnalyzerFiles = analyzerFiles, SourceFiles = sourceFiles, ProjectReferences = projectReferences, References = references }); }