AddImport\AbstractAddImportFeatureService.cs (16)
144var project = document.Project;
145var projectToAssembly = new ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol>>(concurrencyLevel: 2, capacity: project.Solution.ProjectIds.Count);
166private static bool IsHostOrRemoteWorkspace(Project project)
170ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol>> projectToAssembly,
172Project project,
215ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol>> projectToAssembly,
216Project project, ConcurrentQueue<Reference> allSymbolReferences, int maxResults,
261Project project, ConcurrentQueue<Reference> allSymbolReferences, int maxResults, SymbolReferenceFinder finder,
321private static ImmutableArray<(Project, PortableExecutableReference)> GetUnreferencedMetadataReferences(
322Project project, HashSet<PortableExecutableReference> seenReferences)
324using var _ = ArrayBuilder<(Project, PortableExecutableReference)>.GetInstance(out var result);
327foreach (var p in solution.Projects)
428private static Compilation CreateCompilation(Project project, PortableExecutableReference reference)
454private static HashSet<Project> GetViableUnreferencedProjects(Project project)
457var viableProjects = new HashSet<Project>(solution.Projects.Where(p => p.SupportsCompilation));
CodeFixes\Configuration\ConfigurationUpdater.cs (14)
70private readonly Project _project;
82Project project,
110Project project,
129Project project,
160Project project,
174Project project,
183Project project,
202Project project,
213Project project,
231var currentProject = project;
307var project = currentSolution.GetProject(projectId);
322private static AnalyzerConfigDocument? GetOrCreateAnalyzerConfigDocument(Project project, string analyzerConfigPath)
342Project project)
383internal static ImmutableArray<IOption2> GetCodeStyleOptionsForDiagnostic(Diagnostic diagnostic, Project project)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.GlobalSuppressMessageFixAllCodeAction.cs (9)
34Project project)
48internal static CodeAction Create(string title, AbstractSuppressionCodeFixProvider fixer, Project triggerProject, ImmutableDictionary<Project, ImmutableArray<Diagnostic>> diagnosticsByProject)
76var oldProject = grouping.Key;
77var currentProject = currentSolution.GetProject(oldProject.Id);
98Project triggerProject,
99ImmutableDictionary<Project, ImmutableArray<Diagnostic>> diagnosticsByProject,
105var currentProject = currentSolution.GetProject(oldProject.Id);
173private static async Task<IEnumerable<KeyValuePair<ISymbol, ImmutableArray<Diagnostic>>>> CreateDiagnosticsBySymbolAsync(Project project, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction.cs (1)
26Project project,
DesignerAttribute\DesignerAttributeDiscoveryService.cs (7)
62private static async ValueTask<bool> HasDesignerCategoryTypeAsync(Project project, CancellationToken cancellationToken)
136var frozenProject = frozenDocument.Project;
177Project project,
197Project project,
221Project project,
267Project project, DocumentId documentId, string filePath, bool hasDesignerCategoryType, string? existingCategory)
285bool hasDesignerCategoryType, Project project, DocumentId documentId, string? existingCategory, CancellationToken cancellationToken)
Diagnostics\IDiagnosticAnalyzerService.cs (3)
33Task<ImmutableArray<DiagnosticData>> ForceAnalyzeProjectAsync(Project project, CancellationToken cancellationToken);
56Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForIdsAsync(Project project, DocumentId? documentId, ImmutableHashSet<string>? diagnosticIds, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer, bool includeLocalDocumentDiagnostics, bool includeNonLocalDocumentDiagnostics, CancellationToken cancellationToken);
73Task<ImmutableArray<DiagnosticData>> GetProjectDiagnosticsForIdsAsync(Project project, ImmutableHashSet<string>? diagnosticIds, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer, bool includeNonLocalDocumentDiagnostics, CancellationToken cancellationToken);
Diagnostics\Service\DiagnosticAnalyzerService.cs (5)
80public static Task<VersionStamp> GetDiagnosticVersionAsync(Project project, CancellationToken cancellationToken)
117public Task<ImmutableArray<DiagnosticData>> ForceAnalyzeProjectAsync(Project project, CancellationToken cancellationToken)
121Project project, DocumentId? documentId, ImmutableHashSet<string>? diagnosticIds, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer, bool includeLocalDocumentDiagnostics, bool includeNonLocalDocumentDiagnostics, CancellationToken cancellationToken)
127Project project, ImmutableHashSet<string>? diagnosticIds,
139public Task<ImmutableArray<DiagnosticAnalyzer>> GetAnalyzersAsync(Project project, CancellationToken cancellationToken)
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.CompilationManager.cs (1)
29Project project,
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.Executor.cs (1)
29Project project,
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnostics.cs (4)
21public Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForIdsAsync(Project project, DocumentId? documentId, ImmutableHashSet<string>? diagnosticIds, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer, bool includeLocalDocumentDiagnostics, bool includeNonLocalDocumentDiagnostics, CancellationToken cancellationToken)
36Project project,
52Project project,
138bool ShouldIncludeAnalyzer(Project project, DiagnosticAnalyzer analyzer)
EditAndContinue\EditSession.cs (21)
155public async Task<string?> ReportModuleDiagnosticsAsync(Guid mvid, Project oldProject, Project newProject, ImmutableArray<DocumentAnalysisResults> documentAnalyses, ArrayBuilder<Diagnostic> diagnostics, CancellationToken cancellationToken)
176private static async IAsyncEnumerable<Location> CreateChangedLocationsAsync(Project oldProject, Project newProject, ImmutableArray<DocumentAnalysisResults> documentAnalyses, [EnumeratorCancellation] CancellationToken cancellationToken)
286foreach (var newProject in newSolution.Projects)
293var oldProject = oldSolution.GetProject(newProject.Id);
301foreach (var oldProject in oldSolution.Projects)
308var newProject = newSolution.GetProject(oldProject.Id);
335internal static async ValueTask<bool> HasDocumentDifferencesAsync(Project oldProject, Project newProject, ProjectDocumentDifferences? documentDifferences, CancellationToken cancellationToken)
437internal static async Task GetDocumentDifferencesAsync(TraceLog log, Project oldProject, Project newProject, ProjectDocumentDifferences documentDifferences, ArrayBuilder<Diagnostic> diagnostics, CancellationToken cancellationToken)
486private static async ValueTask<TextDocumentStates<SourceGeneratedDocumentState>> GetSourceGeneratedDocumentStatesAsync(TraceLog log, Project project, ArrayBuilder<Diagnostic>? diagnostics, CancellationToken cancellationToken)
506internal static async IAsyncEnumerable<DocumentId> GetChangedDocumentsAsync(TraceLog log, Project oldProject, Project newProject, [EnumeratorCancellation] CancellationToken cancellationToken)
650Project oldProject,
651Project newProject,
884foreach (var newProject in solution.Projects)
893var oldProject = oldSolution.GetProject(newProject.Id);
1272private async ValueTask LogDeltaFilesAsync(TraceLog.FileLogger log, ManagedHotReloadUpdate delta, int baselineGeneration, Project oldProject, Project newProject, CancellationToken cancellationToken)
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexBraceMatcher.cs (1)
39Project project,
ExternalAccess\UnitTesting\API\INewUnitTestingIncrementalAnalyzerImplementation.cs (1)
18Project project,
ExternalAccess\UnitTesting\API\NewUnitTestingIncrementalAnalyzer.cs (1)
29Project project,
ExternalAccess\UnitTesting\SolutionCrawler\IUnitTestingIncrementalAnalyzer.cs (1)
19Project project,
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (20)
226foreach (var addedProject in solutionChanges.GetAddedProjects())
236foreach (var removedProject in solutionChanges.GetRemovedProjects())
260var oldProject = oldSolution.GetRequiredProject(projectId);
261var newProject = newSolution.GetRequiredProject(projectId);
278var project = solution.GetRequiredProject(documentId.ProjectId);
289var oldProject = oldSolution.GetRequiredProject(documentId.ProjectId);
290var newProject = newSolution.GetRequiredProject(documentId.ProjectId);
329private async Task EnqueueDocumentWorkItemAsync(Project project, DocumentId documentId, TextDocument? document, UnitTestingInvocationReasons invocationReasons, SyntaxNode? changedMember = null)
354private static Document GetRequiredDocument(Project project, DocumentId documentId, Document? document)
369private async Task EnqueueFullProjectWorkItemAsync(Project project, UnitTestingInvocationReasons invocationReasons)
397IUnitTestingIncrementalAnalyzer analyzer, Project project, DocumentId documentId, Document? document, UnitTestingInvocationReasons invocationReasons)
427var oldProject = projectChanges.OldProject;
428var newProject = projectChanges.NewProject;
497foreach (var project in solution.Projects)
568var project = solution.GetProject(projectId);
616var project = solution.GetProject(projectId);
634public IEnumerable<(Project project, DocumentId documentId)> GetDocumentIds(Solution solution)
643foreach (var project in solution.Projects)
660var project = solution.GetProject(projectId);
671var project = solution.GetProject(documentId.ProjectId);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (8)
209private void EnqueueFullProjectDependency(Project project, IAssemblySymbol? internalVisibleToAssembly = null)
226var otherProject = solution.GetProject(projectId);
243public void Enqueue(Project project, DocumentId documentId, Document? document, SyntaxPath? changedMember)
308private readonly struct UnitTestingData(Project project, DocumentId documentId, Document? document, SyntaxPath? changedMember, IAsyncToken asyncToken)
313public readonly Project Project = project;
382public async Task EnqueueWorkItemAsync(Project project, DocumentId documentId, Document? document)
405var project = _registration.GetSolutionToAnalyze().GetProject(data.ProjectId);
430private async Task EnqueueWorkItemAsync(Project? project)
NavigateTo\NavigateToSearcher.cs (21)
189var project = _activeDocument.Project;
206var activeProject = _activeDocument.Project;
217private INavigateToSearchService GetNavigateToSearchService(Project project)
232ImmutableArray<ImmutableArray<Project>> orderedProjects,
284private ImmutableArray<ImmutableArray<Project>> GetOrderedProjectsToProcess()
286using var result = TemporaryArray<ImmutableArray<Project>>.Empty;
288using var _ = PooledHashSet<Project>.GetInstance(out var processedProjects);
299using var buffer = TemporaryArray<Project>.Empty;
310foreach (var project in _solution.Projects)
327private ImmutableArray<Document> GetPriorityDocuments(ImmutableArray<Project> projects)
329using var _1 = PooledHashSet<Project>.GetInstance(out var projectsSet);
348ImmutableArray<ImmutableArray<Project>> orderedProjects,
350Func<INavigateToSearchService, ImmutableArray<Project>, Func<ImmutableArray<INavigateToSearchResult>, Task>, Func<Task>, Task> processProjectAsync,
379async ValueTask SearchCoreAsync(IGrouping<INavigateToSearchService, Project> grouping, CancellationToken cancellationToken)
413ImmutableArray<ImmutableArray<Project>> orderedProjects,
431ImmutableArray<ImmutableArray<Project>> orderedProjects,
449foreach (var project in projects)
463ImmutableArray<ImmutableArray<Project>> orderedProjects,
506foreach (var project in projects)
535public async Task SearchProjectsAsync(Solution solution, ImmutableArray<Project> projects, ImmutableArray<Document> priorityDocuments, string searchPattern, IImmutableSet<string> kinds, Document? activeDocument, Func<ImmutableArray<INavigateToSearchResult>, Task> onResultsFound, Func<Task> onProjectCompleted, CancellationToken cancellationToken)
537foreach (var _ in projects)
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (5)
81Project sourceProject,
282var navigateProject = pendingSolution.GetRequiredProject(projectId);
306private ProjectInfo? CreateProjectInfo(Workspace workspace, Project project, ImmutableDictionary<string, string> pdbCompilationOptions, string assemblyName, string assemblyVersion, SourceHashAlgorithm checksumAlgorithm)
338SourceFileInfo?[] sourceFileInfos, Encoding encoding, ProjectId projectId, Workspace sourceWorkspace, Project sourceProject)
430public Project? MapDocument(Document document)
SyncNamespaces\AbstractSyncNamespacesService.cs (11)
33ImmutableArray<Project> projects,
58private static async Task<ImmutableDictionary<Project, ImmutableArray<Diagnostic>>> GetDiagnosticsByProjectAsync(
59ImmutableArray<Project> projects,
64var builder = ImmutableDictionary.CreateBuilder<Project, ImmutableArray<Diagnostic>>();
66foreach (var project in projects)
76Project project,
98ImmutableDictionary<Project, ImmutableArray<Diagnostic>> diagnosticsByProject,
156private readonly ImmutableDictionary<Project, ImmutableArray<Diagnostic>> _diagnosticsByProject;
158internal DiagnosticProvider(ImmutableDictionary<Project, ImmutableArray<Diagnostic>> diagnosticsByProject)
163public override Task<IEnumerable<Diagnostic>> GetAllDiagnosticsAsync(Project project, CancellationToken cancellationToken)
176public override Task<IEnumerable<Diagnostic>> GetProjectDiagnosticsAsync(Project project, CancellationToken cancellationToken)
Diagnostics\Extensions.cs (12)
27private static readonly ConditionalWeakTable<Project, AsyncLazy<Checksum>> s_projectToDiagnosticChecksum = new();
29public static async Task<ImmutableArray<Diagnostic>> ToDiagnosticsAsync(this IEnumerable<DiagnosticData> diagnostics, Project project, CancellationToken cancellationToken)
40public static ValueTask<ImmutableArray<Location>> ConvertLocationsAsync(this IReadOnlyCollection<DiagnosticDataLocation> locations, Project project, CancellationToken cancellationToken)
44this DiagnosticDataLocation dataLocation, Project project, CancellationToken cancellationToken)
110Project project,
323Project project,
371Project project,
457/// <see cref="Project.GetDependentSemanticVersionAsync(CancellationToken)"/> does not change as it only returns top level changes.</item>
459/// <see cref="Project.GetDependentSemanticVersionAsync(CancellationToken)"/> changes as the project is removed, then added resulting in a version change.</item>
465public static Task<Checksum> GetDiagnosticChecksumAsync(this Project? project, CancellationToken cancellationToken)
478static async Task<Checksum> ComputeDiagnosticChecksumAsync(Project project, CancellationToken cancellationToken)
510public static async Task<ImmutableArray<Diagnostic>> GetSourceGeneratorDiagnosticsAsync(Project project, CancellationToken cancellationToken)
FindSymbols\Declarations\DeclarationFinder_SourceDeclarations.cs (5)
64Project project, string name, bool ignoreCase, SymbolFilter criteria, CancellationToken cancellationToken)
135Project project, string pattern, SymbolFilter criteria, CancellationToken cancellationToken)
181foreach (var project in solution.Projects)
191Project project, string name, bool ignoreCase, SymbolFilter filter, CancellationToken cancellationToken)
246Project project, string pattern, SymbolFilter criteria, CancellationToken cancellationToken)
FindSymbols\FindReferences\DependentProjectsFinder.cs (27)
36(IAssemblySymbol assembly, Project? sourceProject, SymbolVisibility visibility),
37ImmutableArray<(Project project, bool hasInternalsAccess)>>> s_solutionToDependentProjectMap = new();
40public static async Task<ImmutableArray<Project>> GetDependentProjectsAsync(
41Solution solution, ImmutableArray<ISymbol> symbols, IImmutableSet<Project> projects, CancellationToken cancellationToken)
73private static async Task<ImmutableArray<Project>> GetDependentProjectsWorkerAsync(
80using var _ = PooledHashSet<Project>.GetInstance(out var result);
101/// cref="IAssemblySymbol"/> for both source and metadata symbols, and an optional <see cref="Project"/> if this
104private static Dictionary<IAssemblySymbol, (Project? sourceProject, SymbolVisibility maxVisibility)> GetSymbolOriginations(
107var result = new Dictionary<IAssemblySymbol, (Project? sourceProject, SymbolVisibility visibility)>();
120var project = assembly.Locations.Any(static loc => loc.IsInMetadata)
134private static async Task<ImmutableArray<(Project project, bool hasInternalsAccess)>> ComputeDependentProjectsAsync(
136(IAssemblySymbol assembly, Project? sourceProject) symbolOrigination,
143ImmutableArray<(Project project, bool hasInternalsAccess)> dependentProjects;
162static async Task<ImmutableArray<(Project project, bool hasInternalsAccess)>> ComputeDependentProjectsWorkerAsync(
164(IAssemblySymbol assembly, Project? sourceProject) symbolOrigination,
170using var _ = PooledHashSet<(Project, bool hasInternalsAccess)>.GetInstance(out var dependentProjects);
193Solution solution, Project? sourceProject, HashSet<(Project project, bool hasInternalsAccess)> dependentProjects, CancellationToken cancellationToken)
203var project = solution.GetRequiredProject(projectId);
215var referencedProject = solution.GetProject(previous.Assembly, cancellationToken);
259(IAssemblySymbol assembly, Project? sourceProject) symbolOrigination,
260HashSet<(Project project, bool hasInternalsAccess)> dependentProjects,
268foreach (var project in solution.Projects)
307(IAssemblySymbol assembly, Project? sourceProject) symbolOrigination,
308Project project,
324private static async Task<bool> HasReferenceToAssemblyAsync(Project project, string assemblyName, CancellationToken cancellationToken)
396static Compilation CreateCompilation(Project project)
FindSymbols\FindReferences\Finders\AbstractMemberScopedReferenceFinder.cs (1)
30Project project,
FindSymbols\FindReferences\Finders\AbstractReferenceFinder.cs (15)
29ISymbol symbol, Project project, CancellationToken cancellationToken);
35ISymbol symbol, HashSet<string>? globalAliases, Project project, IImmutableSet<Document>? documents, Action<Document, TData> processResult, TData processResultData, FindReferencesSearchOptions options, CancellationToken cancellationToken);
85Project project,
118Project project,
141Project project, IImmutableSet<Document>? documents, Action<Document, TData> processResult, TData processResultData, CancellationToken cancellationToken)
148Project project,
330Project project,
346Project project,
362protected static Task FindDocumentsWithForEachStatementsAsync<TData>(Project project, IImmutableSet<Document>? documents, Action<Document, TData> processResult, TData processResultData, CancellationToken cancellationToken)
365protected static Task FindDocumentsWithUsingStatementsAsync<TData>(Project project, IImmutableSet<Document>? documents, Action<Document, TData> processResult, TData processResultData, CancellationToken cancellationToken)
804TSymbol symbol, HashSet<string>? globalAliases, Project project, IImmutableSet<Document>? documents,
814TSymbol symbol, Project project, CancellationToken cancellationToken)
820ISymbol symbol, Project project, CancellationToken cancellationToken)
828ISymbol symbol, HashSet<string>? globalAliases, Project project,
872Project project, string name, int arity, CancellationToken cancellationToken)
FindSymbols\FindReferences\Finders\ConstructorInitializerSymbolReferenceFinder.cs (1)
23Project project,
FindSymbols\FindReferences\Finders\DestructorSymbolReferenceFinder.cs (1)
21Project project,
FindSymbols\FindReferences\Finders\DynamicTypeSymbolReferenceFinder.cs (1)
28Project project,
FindSymbols\FindReferences\Finders\ExplicitConversionSymbolReferenceFinder.cs (1)
29Project project,
FindSymbols\FindReferences\Finders\ExplicitInterfaceMethodReferenceFinder.cs (1)
21Project project,
FindSymbols\FindReferences\Finders\MethodTypeParameterSymbolReferenceFinder.cs (1)
44Project project,
FindSymbols\FindReferences\Finders\OrdinaryMethodReferenceFinder.cs (4)
50Project project,
93private static Task FindDocumentsWithDeconstructionAsync<TData>(Project project, IImmutableSet<Document>? documents, Action<Document, TData> processResult, TData processResultData, CancellationToken cancellationToken)
96private static Task FindDocumentsWithAwaitExpressionAsync<TData>(Project project, IImmutableSet<Document>? documents, Action<Document, TData> processResult, TData processResultData, CancellationToken cancellationToken)
99private static Task FindDocumentsWithCollectionInitializersAsync<TData>(Project project, IImmutableSet<Document>? documents, Action<Document, TData> processResult, TData processResultData, CancellationToken cancellationToken)
FindSymbols\FindReferences\Finders\ParameterSymbolReferenceFinder.cs (1)
27Project project,
FindSymbols\FindReferences\Finders\PreprocessingSymbolReferenceFinder.cs (1)
22Project project,
FindSymbols\FindReferences\Finders\PropertyAccessorSymbolReferenceFinder.cs (1)
35Project project,
FindSymbols\FindReferences\Finders\PropertySymbolReferenceFinder.cs (3)
110Project project,
175Project project, IImmutableSet<Document>? documents, Action<Document, TData> processResult, TData processResultData, CancellationToken cancellationToken)
182Project project, IImmutableSet<Document>? documents, Action<Document, TData> processResult, TData processResultData, CancellationToken cancellationToken)
FindSymbols\FindReferences\Finders\TypeParameterSymbolReferenceFinder.cs (1)
21Project project,
FindSymbols\SymbolFinder_Declarations_CustomQueries.cs (4)
61var project = solution.GetRequiredProject(projectId);
73public static Task<IEnumerable<ISymbol>> FindSourceDeclarationsAsync(Project project, Func<string, bool> predicate, CancellationToken cancellationToken = default)
79public static async Task<IEnumerable<ISymbol>> FindSourceDeclarationsAsync(Project project, Func<string, bool> predicate, SymbolFilter filter, CancellationToken cancellationToken = default)
89Project project, SearchQuery query, SymbolFilter filter, CancellationToken cancellationToken)
FindSymbols\SymbolFinder_Declarations_SourceDeclarations.cs (4)
40public static Task<IEnumerable<ISymbol>> FindSourceDeclarationsAsync(Project project, string name, bool ignoreCase, CancellationToken cancellationToken = default)
47Project project, string name, bool ignoreCase, SymbolFilter filter, CancellationToken cancellationToken = default)
95public static Task<IEnumerable<ISymbol>> FindSourceDeclarationsWithPatternAsync(Project project, string pattern, CancellationToken cancellationToken = default)
106Project project, string pattern, SymbolFilter filter, CancellationToken cancellationToken = default)
FindSymbols\SymbolFinder_Hierarchy.cs (19)
27ISymbol symbol, Solution solution, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default)
37ISymbol symbol, Solution solution, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default)
93ISymbol symbol, Solution solution, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default)
116IImmutableSet<Project>? projects,
204/// IImmutableSet{Project}, CancellationToken)"/>.
213INamedTypeSymbol type, Solution solution, IImmutableSet<Project>? projects, CancellationToken cancellationToken)
221/// IImmutableSet{Project}, CancellationToken)"/>.
231INamedTypeSymbol type, Solution solution, bool transitive = true, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default)
243/// <inheritdoc cref="FindDerivedClassesArrayAsync(INamedTypeSymbol, Solution, bool, IImmutableSet{Project}, CancellationToken)"/>
246INamedTypeSymbol type, Solution solution, bool transitive, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default)
267INamedTypeSymbol type, Solution solution, bool transitive = true, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default)
279/// <inheritdoc cref="FindDerivedInterfacesAsync(INamedTypeSymbol, Solution, bool, IImmutableSet{Project}, CancellationToken)"/>
282INamedTypeSymbol type, Solution solution, bool transitive, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default)
303INamedTypeSymbol type, Solution solution, bool transitive = true, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default)
315/// <inheritdoc cref="FindImplementationsAsync(INamedTypeSymbol, Solution, bool, IImmutableSet{Project}, CancellationToken)"/>
318INamedTypeSymbol type, Solution solution, bool transitive, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default)
332ISymbol symbol, Solution solution, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default)
351/// <inheritdoc cref="FindImplementationsAsync(ISymbol, Solution, IImmutableSet{Project}, CancellationToken)"/>
356ISymbol symbol, Solution solution, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default)
Shared\Extensions\ProjectExtensions.cs (12)
16internal static Project WithSolutionOptions(this Project project, OptionSet options)
19public static TextDocument? GetTextDocument(this Project project, DocumentId? documentId)
22internal static DocumentId? GetDocumentForExternalLocation(this Project project, Location location)
28internal static DocumentId? GetDocumentForFile(this Project project, AdditionalText additionalText)
31private static DocumentId? GetDocumentIdWithFilePath(this Project project, string filePath)
34public static Document GetRequiredDocument(this Project project, DocumentId documentId)
37public static Document GetRequiredDocument(this Project project, SyntaxTree tree)
40public static TextDocument GetRequiredAdditionalDocument(this Project project, DocumentId documentId)
43public static TextDocument GetRequiredAnalyzerConfigDocument(this Project project, DocumentId documentId)
46public static TextDocument GetRequiredTextDocument(this Project project, DocumentId documentId)
49public static async ValueTask<Document> GetRequiredSourceGeneratedDocumentAsync(this Project project, DocumentId documentId, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\FixAllHelper.cs (1)
15Project triggerProject)
Storage\SQLite\v2\SQLitePersistentStorage_ProjectSerialization.cs (3)
17protected override Task<bool> ChecksumMatchesAsync(ProjectKey projectKey, Project? project, string name, Checksum checksum, CancellationToken cancellationToken)
20protected override Task<Stream?> ReadStreamAsync(ProjectKey projectKey, Project? project, string name, Checksum? checksum, CancellationToken cancellationToken)
23protected override Task<bool> WriteStreamAsync(ProjectKey projectKey, Project? project, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken)
Workspace\Host\PersistentStorage\AbstractPersistentStorage.cs (8)
50protected abstract Task<bool> ChecksumMatchesAsync(ProjectKey projectKey, Project? project, string name, Checksum checksum, CancellationToken cancellationToken);
52protected abstract Task<Stream?> ReadStreamAsync(ProjectKey projectKey, Project? project, string name, Checksum? checksum, CancellationToken cancellationToken);
54protected abstract Task<bool> WriteStreamAsync(ProjectKey projectKey, Project? project, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken);
75public Task<bool> ChecksumMatchesAsync(Project project, string name, Checksum checksum, CancellationToken cancellationToken)
81public Task<Stream?> ReadStreamAsync(Project project, string name, Checksum? checksum, CancellationToken cancellationToken)
90public Task<Stream?> ReadStreamAsync(Project project, string name, CancellationToken cancellationToken)
96public Task<bool> WriteStreamAsync(Project project, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken)
105public Task<bool> WriteStreamAsync(Project project, string name, Stream stream, CancellationToken cancellationToken)
Workspace\Host\PersistentStorage\IChecksummedPersistentStorage.cs (3)
29Task<bool> ChecksumMatchesAsync(Project project, string name, Checksum checksum, CancellationToken cancellationToken = default);
52Task<Stream?> ReadStreamAsync(Project project, string name, Checksum? checksum = null, CancellationToken cancellationToken = default);
84Task<bool> WriteStreamAsync(Project project, string name, Stream stream, Checksum? checksum = null, CancellationToken cancellationToken = default);
Workspace\Host\PersistentStorage\NoOpPersistentStorage.cs (5)
26public Task<bool> ChecksumMatchesAsync(Project project, string name, Checksum checksum, CancellationToken cancellationToken)
41public Task<Stream?> ReadStreamAsync(Project project, string name, CancellationToken cancellationToken)
50public Task<Stream?> ReadStreamAsync(Project project, string name, Checksum? checksum, CancellationToken cancellationToken)
65public Task<bool> WriteStreamAsync(Project project, string name, Stream stream, CancellationToken cancellationToken)
74public Task<bool> WriteStreamAsync(Project project, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken)
Workspace\Solution\Project.cs (33)
53/// The ID of the project. Multiple <see cref="Project"/> instances may share the same ID. However, only
92/// <see langword="true"/> if this <see cref="Project"/> supports providing data through the
496private static readonly Func<DocumentId, Project, Document?> s_tryCreateDocumentFunction =
499private static readonly Func<DocumentId, Project, AdditionalDocument?> s_tryCreateAdditionalDocumentFunction =
502private static readonly Func<DocumentId, Project, AnalyzerConfigDocument?> s_tryCreateAnalyzerConfigDocumentFunction =
505private static readonly Func<DocumentId, (SourceGeneratedDocumentState state, Project project), SourceGeneratedDocument> s_createSourceGeneratedDocumentFunction =
537public ProjectChanges GetChanges(Project oldProject)
581public Project WithAssemblyName(string assemblyName)
587public Project WithDefaultNamespace(string defaultNamespace)
590internal Project WithOutputFilePath(string? path)
593internal Project WithOutputRefFilePath(string? path)
596internal Project WithCompilationOutputInfo(in CompilationOutputInfo info)
602public Project WithCompilationOptions(CompilationOptions options)
608public Project WithParseOptions(ParseOptions options)
615public Project AddProjectReference(ProjectReference projectReference)
622public Project AddProjectReferences(IEnumerable<ProjectReference> projectReferences)
628public Project RemoveProjectReference(ProjectReference projectReference)
635public Project WithProjectReferences(IEnumerable<ProjectReference> projectReferences)
642public Project AddMetadataReference(MetadataReference metadataReference)
649public Project AddMetadataReferences(IEnumerable<MetadataReference> metadataReferences)
655public Project RemoveMetadataReference(MetadataReference metadataReference)
662public Project WithMetadataReferences(IEnumerable<MetadataReference> metadataReferences)
669public Project AddAnalyzerReference(AnalyzerReference analyzerReference)
676public Project AddAnalyzerReferences(IEnumerable<AnalyzerReference> analyzerReferences)
682public Project RemoveAnalyzerReference(AnalyzerReference analyzerReference)
689public Project WithAnalyzerReferences(IEnumerable<AnalyzerReference> analyzerReferencs)
696internal Project WithAttributes(ProjectInfo.ProjectAttributes attributes)
759public Project RemoveDocument(DocumentId documentId)
769public Project RemoveDocuments(ImmutableArray<DocumentId> documentIds)
779public Project RemoveAdditionalDocument(DocumentId documentId)
787public Project RemoveAdditionalDocuments(ImmutableArray<DocumentId> documentIds)
797public Project RemoveAnalyzerConfigDocument(DocumentId documentId)
805public Project RemoveAnalyzerConfigDocuments(ImmutableArray<DocumentId> documentIds)
Library\VsNavInfo\NavInfoFactory.cs (7)
21public IVsNavInfo CreateForProject(Project project)
34public IVsNavInfo CreateForSymbol(ISymbol symbol, Project project, Compilation compilation, bool useExpandedHierarchy = false)
63public IVsNavInfo CreateForNamespace(INamespaceSymbol namespaceSymbol, Project project, Compilation compilation, bool useExpandedHierarchy = false)
73public IVsNavInfo CreateForType(ITypeSymbol typeSymbol, Project project, Compilation compilation, bool useExpandedHierarchy = false)
114public IVsNavInfo CreateForMember(ISymbol memberSymbol, Project project, Compilation compilation, bool useExpandedHierarchy = false)
128private IVsNavInfo Create(IAssemblySymbol containingAssembly, Project project, Compilation compilation, bool useExpandedHierarchy = false,
174private static string GetLibraryName(Project project)
TableDataSource\Suppression\VisualStudioSuppressionFixService.cs (18)
126private static Func<Project, bool> GetShouldFixInProjectDelegate(IVsHierarchyItemManager vsHierarchyItemManager, IHierarchyItemToProjectIdMap projectMap, IVsHierarchy? projectHierarchy)
172Func<Project, bool> shouldFixInProject,
183private bool ApplySuppressionFix(IEnumerable<DiagnosticData>? diagnosticsToFix, Func<Project, bool> shouldFixInProject, bool filterStaleDiagnostics, bool isAddSuppression, bool isSuppressionInSource, bool onlyCompilerDiagnostics, bool showPreviewChangesDialog)
191Func<Project, bool> shouldFixInProject,
229? ImmutableDictionary<Project, ImmutableArray<Diagnostic>>.Empty
423private static ImmutableDictionary<Project, ImmutableArray<Diagnostic>> GetProjectDiagnosticsMappedToNewSolution(ImmutableDictionary<Project, ImmutableArray<Diagnostic>> projectDiagnosticsToFixMap, Solution newSolution, string language)
425ImmutableDictionary<Project, ImmutableArray<Diagnostic>>.Builder? projectDiagsBuilder = null;
431var project = newSolution.GetProject(oldProject.Id);
434projectDiagsBuilder ??= ImmutableDictionary.CreateBuilder<Project, ImmutableArray<Diagnostic>>();
439return projectDiagsBuilder != null ? projectDiagsBuilder.ToImmutable() : ImmutableDictionary<Project, ImmutableArray<Diagnostic>>.Empty;
448private async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync(IEnumerable<DiagnosticData> diagnosticsToFix, Func<Project, bool> shouldFixInProject, bool filterStaleDiagnostics, CancellationToken cancellationToken)
474var project = _workspace.CurrentSolution.GetProject(projectId);
541private async Task<ImmutableDictionary<Project, ImmutableArray<Diagnostic>>> GetProjectDiagnosticsToFixAsync(IEnumerable<DiagnosticData> diagnosticsToFix, Func<Project, bool> shouldFixInProject, bool filterStaleDiagnostics, CancellationToken cancellationToken)
548return ImmutableDictionary<Project, ImmutableArray<Diagnostic>>.Empty;
550var finalBuilder = ImmutableDictionary.CreateBuilder<Project, ImmutableArray<Diagnostic>>();
554var project = _workspace.CurrentSolution.GetProject(projectId);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\FixAllHelper.cs (1)
15Project triggerProject)