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)
27Project project,
DesignerAttribute\DesignerAttributeDiscoveryService.cs (6)
62private static async ValueTask<bool> HasDesignerCategoryTypeAsync(Project project, CancellationToken cancellationToken)
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\ICodeAnalysisDiagnosticAnalyzerService.cs (4)
23Task RunAnalysisAsync(Solution solution, ProjectId? projectId, Action<Project> onAfterProjectAnalyzed, CancellationToken cancellationToken);
26/// Returns true if <see cref="RunAnalysisAsync(Solution, ProjectId?, Action{Project}, CancellationToken)"/> was invoked
36/// <see cref="RunAnalysisAsync(Solution, ProjectId?, Action{Project}, CancellationToken)"/> invocation on the containing project or solution.
46/// <see cref="RunAnalysisAsync(Solution, ProjectId?, Action{Project}, CancellationToken)"/> invocation on the given project or solution.
Diagnostics\IDiagnosticAnalyzerService.cs (2)
54Task ForceAnalyzeProjectAsync(Project project, CancellationToken cancellationToken);
79Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForIdsAsync(Solution solution, ProjectId? projectId, DocumentId? documentId, ImmutableHashSet<string>? diagnosticIds, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer, Func<Project, DocumentId?, IReadOnlyList<DocumentId>>? getDocumentIds, bool includeSuppressedDiagnostics, bool includeLocalDocumentDiagnostics, bool includeNonLocalDocumentDiagnostics, CancellationToken cancellationToken);
EditAndContinue\EditSession.cs (21)
151public async Task<ImmutableArray<Diagnostic>?> GetModuleDiagnosticsAsync(Guid mvid, Project oldProject, Project newProject, ImmutableArray<DocumentAnalysisResults> documentAnalyses, CancellationToken cancellationToken)
179private static async IAsyncEnumerable<Location> CreateChangedLocationsAsync(Project oldProject, Project newProject, ImmutableArray<DocumentAnalysisResults> documentAnalyses, [EnumeratorCancellation] CancellationToken cancellationToken)
289foreach (var newProject in newSolution.Projects)
296var oldProject = oldSolution.GetProject(newProject.Id);
304foreach (var oldProject in oldSolution.Projects)
311var newProject = newSolution.GetProject(oldProject.Id);
338internal static async ValueTask<bool> HasChangedOrAddedDocumentsAsync(Project oldProject, Project newProject, ArrayBuilder<Document>? changedOrAddedDocuments, CancellationToken cancellationToken)
426internal static async Task PopulateChangedAndAddedDocumentsAsync(Project oldProject, Project newProject, ArrayBuilder<Document> changedOrAddedDocuments, ArrayBuilder<ProjectDiagnostics> diagnostics, CancellationToken cancellationToken)
464private static async ValueTask<TextDocumentStates<SourceGeneratedDocumentState>> GetSourceGeneratedDocumentStatesAsync(Project project, ArrayBuilder<ProjectDiagnostics>? diagnostics, CancellationToken cancellationToken)
484internal static async IAsyncEnumerable<DocumentId> GetChangedDocumentsAsync(Project oldProject, Project newProject, [EnumeratorCancellation] CancellationToken cancellationToken)
613Project oldProject,
614Project newProject,
819foreach (var newProject in solution.Projects)
826var oldProject = oldSolution.GetProject(newProject.Id);
1154private 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)
21Project project,
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (14)
226foreach (var addedProject in solutionChanges.GetAddedProjects())
236foreach (var removedProject in solutionChanges.GetRemovedProjects())
331private async Task EnqueueDocumentWorkItemAsync(Project project, DocumentId documentId, TextDocument? document, UnitTestingInvocationReasons invocationReasons, SyntaxNode? changedMember = null)
356private static Document GetRequiredDocument(Project project, DocumentId documentId, Document? document)
371private async Task EnqueueFullProjectWorkItemAsync(Project project, UnitTestingInvocationReasons invocationReasons)
402IUnitTestingIncrementalAnalyzer analyzer, Project project, DocumentId documentId, Document? document, UnitTestingInvocationReasons invocationReasons)
432var oldProject = projectChanges.OldProject;
433var newProject = projectChanges.NewProject;
573var project = solution.GetProject(projectId);
621var project = solution.GetProject(projectId);
639public IEnumerable<(Project project, DocumentId documentId)> GetDocumentIds(Solution solution)
648foreach (var project in solution.Projects)
665var project = solution.GetProject(projectId);
676var project = solution.GetProject(documentId.ProjectId);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (7)
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)
430private async Task EnqueueWorkItemAsync(Project? project)
NavigateTo\NavigateToSearcher.cs (21)
188var project = _activeDocument.Project;
205var activeProject = _activeDocument.Project;
216private INavigateToSearchService GetNavigateToSearchService(Project project)
231ImmutableArray<ImmutableArray<Project>> orderedProjects,
283private ImmutableArray<ImmutableArray<Project>> GetOrderedProjectsToProcess()
285using var result = TemporaryArray<ImmutableArray<Project>>.Empty;
287using var _ = PooledHashSet<Project>.GetInstance(out var processedProjects);
298using var buffer = TemporaryArray<Project>.Empty;
309foreach (var project in _solution.Projects)
326private ImmutableArray<Document> GetPriorityDocuments(ImmutableArray<Project> projects)
328using var _1 = PooledHashSet<Project>.GetInstance(out var projectsSet);
347ImmutableArray<ImmutableArray<Project>> orderedProjects,
349Func<INavigateToSearchService, ImmutableArray<Project>, Func<ImmutableArray<INavigateToSearchResult>, Task>, Func<Task>, Task> processProjectAsync,
378async ValueTask SearchCoreAsync(IGrouping<INavigateToSearchService, Project> grouping, CancellationToken cancellationToken)
412ImmutableArray<ImmutableArray<Project>> orderedProjects,
430ImmutableArray<ImmutableArray<Project>> orderedProjects,
448foreach (var project in projects)
462ImmutableArray<ImmutableArray<Project>> orderedProjects,
505foreach (var project in projects)
534public 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)
536foreach (var _ in projects)
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (4)
82Project sourceProject,
307private ProjectInfo? CreateProjectInfo(Workspace workspace, Project project, ImmutableDictionary<string, string> pdbCompilationOptions, string assemblyName, string assemblyVersion, SourceHashAlgorithm checksumAlgorithm)
339SourceFileInfo?[] sourceFileInfos, Encoding encoding, ProjectId projectId, Workspace sourceWorkspace, Project sourceProject)
431public 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)
Features\Diagnostics\DiagnosticAnalyzerService.cs (2)
107public async Task ForceAnalyzeProjectAsync(Project project, CancellationToken cancellationToken)
114Solution solution, ProjectId? projectId, DocumentId? documentId, ImmutableHashSet<string>? diagnosticIds, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer, Func<Project, DocumentId?, IReadOnlyList<DocumentId>>? getDocuments, bool includeSuppressedDiagnostics, bool includeLocalDocumentDiagnostics, bool includeNonLocalDocumentDiagnostics, CancellationToken cancellationToken)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.Executor.cs (6)
26CompilationWithAnalyzersPair? compilationWithAnalyzers, Project project, ImmutableArray<StateSet> stateSets, CancellationToken cancellationToken)
57ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> result, Project project, CancellationToken cancellationToken)
92CompilationWithAnalyzersPair? compilationWithAnalyzers, Project project, ImmutableArray<DiagnosticAnalyzer> ideAnalyzers, CancellationToken cancellationToken)
123CompilationWithAnalyzersPair? compilationWithAnalyzers, Project project, ImmutableArray<StateSet> stateSets,
237Project project,
298Project project,
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.ProjectState.cs (13)
57public async Task<DiagnosticAnalysisResult> GetAnalysisDataAsync(Project project, bool avoidLoadingData, CancellationToken cancellationToken)
159public async Task<DiagnosticAnalysisResult> GetProjectAnalysisDataAsync(Project project, bool avoidLoadingData, CancellationToken cancellationToken)
195public async ValueTask SaveToInMemoryStorageAsync(Project project, DiagnosticAnalysisResult result)
260var project = document.Project;
306private async Task<DiagnosticAnalysisResult> LoadInitialAnalysisDataAsync(Project project, CancellationToken cancellationToken)
330var project = document.Project;
344private async Task<DiagnosticAnalysisResult> LoadInitialProjectAnalysisDataAsync(Project project, CancellationToken cancellationToken)
358VersionStamp serializerVersion, Project project, TextDocument? document, object key, string stateKey, ImmutableArray<DiagnosticData> diagnostics)
369var project = document.Project;
405private async ValueTask<bool> TryGetProjectDiagnosticsFromInMemoryStorageAsync(VersionStamp serializerVersion, Project project, Builder builder, CancellationToken cancellationToken)
418VersionStamp serializerVersion, Project project, TextDocument? document, object key, string stateKey, CancellationToken _)
455private readonly Project _project;
464public Builder(Project project, VersionStamp version, ImmutableHashSet<DocumentId>? documentIds = null)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnostics.cs (11)
21public Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForIdsAsync(Solution solution, ProjectId? projectId, DocumentId? documentId, ImmutableHashSet<string>? diagnosticIds, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer, Func<Project, DocumentId?, IReadOnlyList<DocumentId>>? getDocuments, bool includeSuppressedDiagnostics, bool includeLocalDocumentDiagnostics, bool includeNonLocalDocumentDiagnostics, CancellationToken cancellationToken)
32Func<Project, DocumentId?, IReadOnlyList<DocumentId>>? getDocuments,
46private readonly Func<Project, DocumentId?, IReadOnlyList<DocumentId>> _getDocuments = getDocuments ?? (static (project, documentId) => documentId != null ? [documentId] : project.DocumentIds);
53Project project, IReadOnlyList<DocumentId> documentIds, bool includeProjectNonLocalResult, Action<DiagnosticData> callback, CancellationToken cancellationToken);
59var project = Solution.GetProject(ProjectId);
76IEnumerable<Project> projects, Func<Project, IReadOnlyList<DocumentId>> getDocumentIds,
113Project project, IReadOnlyList<DocumentId> documentIds, bool includeProjectNonLocalResult,
140var project = Solution.GetProject(ProjectId);
158private static async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(StateSet stateSet, Project project, DocumentId? documentId, AnalysisKind kind, CancellationToken cancellationToken)
172private static async Task<ImmutableArray<DiagnosticData>> GetProjectStateDiagnosticsAsync(StateSet stateSet, Project project, DocumentId? documentId, AnalysisKind kind, CancellationToken cancellationToken)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnosticsForSpan.cs (1)
116Project project,
Handler\Diagnostics\DiagnosticSources\AbstractProjectDiagnosticSource.cs (12)
14internal abstract class AbstractProjectDiagnosticSource(Project project)
17protected Project Project => project;
19public static AbstractProjectDiagnosticSource CreateForFullSolutionAnalysisDiagnostics(Project project, IDiagnosticAnalyzerService diagnosticAnalyzerService, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer)
22public static AbstractProjectDiagnosticSource CreateForCodeAnalysisDiagnostics(Project project, ICodeAnalysisDiagnosticAnalyzerService codeAnalysisService)
28public ProjectOrDocumentId GetId() => new(Project.Id);
29public Project GetProject() => Project;
31=> !string.IsNullOrEmpty(Project.FilePath)
32? new VSTextDocumentIdentifier { ProjectContext = ProtocolConversions.ProjectToProjectContext(Project), Uri = ProtocolConversions.CreateAbsoluteUri(Project.FilePath) }
34public string ToDisplayString() => Project.Name;
36private sealed class FullSolutionAnalysisDiagnosticSource(Project project, IDiagnosticAnalyzerService diagnosticAnalyzerService, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer)
53return await diagnosticAnalyzerService.GetProjectDiagnosticsForIdsAsync(Project.Solution, Project.Id,
Diagnostics\DiagnosticAnalysisResultBuilder.cs (15)
19internal struct DiagnosticAnalysisResultBuilder(Project project, VersionStamp version)
21public readonly Project Project = project;
46Contract.ThrowIfTrue(Project.SupportsCompilation);
61var diagnosticDocumentId = Project.GetDocumentForExternalLocation(diagnostic.Location);
65AddDocumentDiagnostic(ref lazyLocals, Project.GetTextDocument(diagnosticDocumentId), diagnostic);
70AddDocumentDiagnostic(ref _lazyNonLocals, Project.GetTextDocument(diagnosticDocumentId), diagnostic);
75AddOtherDiagnostic(DiagnosticData.Create(Project.Solution, diagnostic, Project));
82AddOtherDiagnostic(DiagnosticData.Create(Project.Solution, diagnostic, Project));
142var diagnosticDocumentId = Project.GetDocumentForExternalLocation(diagnostic.Location);
145AddDocumentDiagnostic(ref _lazyNonLocals, Project.GetRequiredTextDocument(diagnosticDocumentId), diagnostic);
149AddOtherDiagnostic(DiagnosticData.Create(Project.Solution, diagnostic, Project));
155AddOtherDiagnostic(DiagnosticData.Create(Project.Solution, diagnostic, Project));
163AddDocumentDiagnostic(ref lazyLocals, Project.GetDocument(diagnosticTree), diagnostic);
168AddDocumentDiagnostic(ref _lazyNonLocals, Project.GetDocument(diagnosticTree), diagnostic);
173AddOtherDiagnostic(DiagnosticData.Create(Project.Solution, diagnostic, Project));
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)
28ISymbol symbol, Project project, CancellationToken cancellationToken);
34ISymbol symbol, HashSet<string>? globalAliases, Project project, IImmutableSet<Document>? documents, Action<Document, TData> processResult, TData processResultData, FindReferencesSearchOptions options, CancellationToken cancellationToken);
84Project project,
117Project project,
140Project project, IImmutableSet<Document>? documents, Action<Document, TData> processResult, TData processResultData, CancellationToken cancellationToken)
147Project project,
329Project project,
345Project project,
361protected static Task FindDocumentsWithForEachStatementsAsync<TData>(Project project, IImmutableSet<Document>? documents, Action<Document, TData> processResult, TData processResultData, CancellationToken cancellationToken)
364protected static Task FindDocumentsWithUsingStatementsAsync<TData>(Project project, IImmutableSet<Document>? documents, Action<Document, TData> processResult, TData processResultData, CancellationToken cancellationToken)
803TSymbol symbol, HashSet<string>? globalAliases, Project project, IImmutableSet<Document>? documents,
813TSymbol symbol, Project project, CancellationToken cancellationToken)
819ISymbol symbol, Project project, CancellationToken cancellationToken)
827ISymbol symbol, HashSet<string>? globalAliases, Project project,
871Project project, string name, int arity, CancellationToken cancellationToken)
FindSymbols\FindReferences\Finders\ConstructorInitializerSymbolReferenceFinder.cs (1)
24Project 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)
43Project 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)
23Project 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)
16Project 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 (35)
51/// The ID of the project. Multiple <see cref="Project"/> instances may share the same ID. However, only
90/// <see langword="true"/> if this <see cref="Project"/> supports providing data through the
465private static readonly Func<DocumentId, Project, Document?> s_tryCreateDocumentFunction =
468private static readonly Func<DocumentId, Project, AdditionalDocument?> s_tryCreateAdditionalDocumentFunction =
471private static readonly Func<DocumentId, Project, AnalyzerConfigDocument?> s_tryCreateAnalyzerConfigDocumentFunction =
474private static readonly Func<DocumentId, (SourceGeneratedDocumentState state, Project project), SourceGeneratedDocument> s_createSourceGeneratedDocumentFunction =
506public ProjectChanges GetChanges(Project oldProject)
566/// <see cref="Project.GetDependentSemanticVersionAsync(CancellationToken)"/> does not change as it only returns top level changes.</item>
568/// <see cref="Project.GetDependentSemanticVersionAsync(CancellationToken)"/> changes as the project is removed, then added resulting in a version change.</item>
578public Project WithAssemblyName(string assemblyName)
584public Project WithDefaultNamespace(string defaultNamespace)
587internal Project WithOutputFilePath(string? path)
590internal Project WithOutputRefFilePath(string? path)
593internal Project WithCompilationOutputInfo(in CompilationOutputInfo info)
599public Project WithCompilationOptions(CompilationOptions options)
605public Project WithParseOptions(ParseOptions options)
612public Project AddProjectReference(ProjectReference projectReference)
619public Project AddProjectReferences(IEnumerable<ProjectReference> projectReferences)
625public Project RemoveProjectReference(ProjectReference projectReference)
632public Project WithProjectReferences(IEnumerable<ProjectReference> projectReferences)
639public Project AddMetadataReference(MetadataReference metadataReference)
646public Project AddMetadataReferences(IEnumerable<MetadataReference> metadataReferences)
652public Project RemoveMetadataReference(MetadataReference metadataReference)
659public Project WithMetadataReferences(IEnumerable<MetadataReference> metadataReferences)
666public Project AddAnalyzerReference(AnalyzerReference analyzerReference)
673public Project AddAnalyzerReferences(IEnumerable<AnalyzerReference> analyzerReferences)
679public Project RemoveAnalyzerReference(AnalyzerReference analyzerReference)
686public Project WithAnalyzerReferences(IEnumerable<AnalyzerReference> analyzerReferencs)
693internal Project WithAttributes(ProjectInfo.ProjectAttributes attributes)
756public Project RemoveDocument(DocumentId documentId)
766public Project RemoveDocuments(ImmutableArray<DocumentId> documentIds)
776public Project RemoveAdditionalDocument(DocumentId documentId)
784public Project RemoveAdditionalDocuments(ImmutableArray<DocumentId> documentIds)
794public Project RemoveAnalyzerConfigDocument(DocumentId documentId)
802public 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 (16)
130private static Func<Project, bool> GetShouldFixInProjectDelegate(IVsHierarchyItemManager vsHierarchyItemManager, IHierarchyItemToProjectIdMap projectMap, IVsHierarchy? projectHierarchy)
176Func<Project, bool> shouldFixInProject,
187private bool ApplySuppressionFix(IEnumerable<DiagnosticData>? diagnosticsToFix, Func<Project, bool> shouldFixInProject, bool filterStaleDiagnostics, bool isAddSuppression, bool isSuppressionInSource, bool onlyCompilerDiagnostics, bool showPreviewChangesDialog)
195Func<Project, bool> shouldFixInProject,
233? ImmutableDictionary<Project, ImmutableArray<Diagnostic>>.Empty
427private static ImmutableDictionary<Project, ImmutableArray<Diagnostic>> GetProjectDiagnosticsMappedToNewSolution(ImmutableDictionary<Project, ImmutableArray<Diagnostic>> projectDiagnosticsToFixMap, Solution newSolution, string language)
429ImmutableDictionary<Project, ImmutableArray<Diagnostic>>.Builder? projectDiagsBuilder = null;
435var project = newSolution.GetProject(oldProject.Id);
438projectDiagsBuilder ??= ImmutableDictionary.CreateBuilder<Project, ImmutableArray<Diagnostic>>();
443return projectDiagsBuilder != null ? projectDiagsBuilder.ToImmutable() : ImmutableDictionary<Project, ImmutableArray<Diagnostic>>.Empty;
452private async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync(IEnumerable<DiagnosticData> diagnosticsToFix, Func<Project, bool> shouldFixInProject, bool filterStaleDiagnostics, CancellationToken cancellationToken)
544private async Task<ImmutableDictionary<Project, ImmutableArray<Diagnostic>>> GetProjectDiagnosticsToFixAsync(IEnumerable<DiagnosticData> diagnosticsToFix, Func<Project, bool> shouldFixInProject, bool filterStaleDiagnostics, CancellationToken cancellationToken)
562return ImmutableDictionary<Project, ImmutableArray<Diagnostic>>.Empty;
565var finalBuilder = ImmutableDictionary.CreateBuilder<Project, ImmutableArray<Diagnostic>>();