RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCommitter.cs (8)
84var solutionWithOriginalName = await CreateSolutionWithOriginalNameAsync(
91var renamedSolution = await Renamer.RenameSymbolAsync(solutionWithOriginalName, symbol, options, newName, cancellationToken).ConfigureAwait(false);
152var finalSolution = workspace.CurrentSolution;
180private async Task<Solution> CreateSolutionWithOriginalNameAsync(
196var solution = document.Project.Solution;
205private async Task<ISymbol> TryGetSymbolAsync(Solution solutionWithOriginalName, DocumentId documentId, CancellationToken cancellationToken)
223private (NotificationSeverity, string)? TryUpdateWorkspaceForResetOfTypedIdentifier(Workspace workspace, Solution newSolution, int trackingSessionId)
256Solution newSolution,
AbstractMakeMethodSynchronousCodeFixProvider.cs (12)
51private async Task<Solution> FixNodeAsync(
73private async Task<Solution> RenameThenRemoveAsyncTokenAsync(Document document, SyntaxNode node, IMethodSymbol methodSymbol, CancellationToken cancellationToken)
77var solution = document.Project.Solution;
83var newSolution = await Renamer.RenameSymbolAsync(solution, methodSymbol, new SymbolRenameOptions(), newName, cancellationToken).ConfigureAwait(false);
96private async Task<Solution> RemoveAsyncTokenAsync(
110var newSolution = newDocument.Project.Solution;
119private static async Task<Solution> RemoveAwaitFromCallersAsync(
154private static async Task<Solution> RemoveAwaitFromCallersAsync(
155Solution solution, ImmutableArray<ReferenceLocation> locations, CancellationToken cancellationToken)
157var currentSolution = solution;
170private static async Task<Solution> RemoveAwaitFromCallersAsync(
171Solution currentSolution, IGrouping<Document, ReferenceLocation> group, CancellationToken cancellationToken)
CodeLens\CodeLensReferencesService.cs (8)
43private static async Task<T?> FindAsync<T>(Solution solution, DocumentId documentId, SyntaxNode syntaxNode,
85public async ValueTask<VersionStamp> GetProjectCodeLensVersionAsync(Solution solution, ProjectId projectId, CancellationToken cancellationToken)
90public async Task<ReferenceCount?> GetReferenceCountAsync(Solution solution, DocumentId documentId, SyntaxNode syntaxNode, int maxSearchResults, CancellationToken cancellationToken)
102private static async Task<ReferenceLocationDescriptor> GetDescriptorOfEnclosingSymbolAsync(Solution solution, Location location, CancellationToken cancellationToken)
203public async Task<ImmutableArray<ReferenceLocationDescriptor>?> FindReferenceLocationsAsync(Solution solution, DocumentId documentId, SyntaxNode syntaxNode, CancellationToken cancellationToken)
246private static async Task<ReferenceMethodDescriptor> TryGetMethodDescriptorAsync(Location commonLocation, Solution solution, CancellationToken cancellationToken)
260public Task<ImmutableArray<ReferenceMethodDescriptor>?> FindReferenceMethodsAsync(Solution solution, DocumentId documentId, SyntaxNode syntaxNode, CancellationToken cancellationToken)
276public async Task<string> GetFullyQualifiedNameAsync(Solution solution, DocumentId documentId, SyntaxNode syntaxNode,
CodeLens\ICodeLensReferencesService.cs (5)
14ValueTask<VersionStamp> GetProjectCodeLensVersionAsync(Solution solution, ProjectId projectId, CancellationToken cancellationToken);
23Task<ReferenceCount?> GetReferenceCountAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, int maxSearchResults, CancellationToken cancellationToken);
28Task<ImmutableArray<ReferenceLocationDescriptor>?> FindReferenceLocationsAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, CancellationToken cancellationToken);
33Task<ImmutableArray<ReferenceMethodDescriptor>?> FindReferenceMethodsAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, CancellationToken cancellationToken);
38Task<string?> GetFullyQualifiedNameAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, CancellationToken cancellationToken);
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (25)
38public abstract Task<Solution> ChangeNamespaceAsync(Document document, SyntaxNode container, string targetNamespace, CodeCleanupOptionsProvider fallbackOptions, CancellationToken cancellationToken);
40public abstract Task<Solution?> TryChangeTopLevelNamespacesAsync(Document document, string targetNamespace, CodeCleanupOptionsProvider fallbackOptions, CancellationToken cancellationToken);
111public override async Task<Solution?> TryChangeTopLevelNamespacesAsync(
132var solution = document.Project.Solution;
173public override async Task<Solution> ChangeNamespaceAsync(
193var solution = document.Project.Solution;
209var annotatedSolution = await AnnotateContainersAsync(solution, containersFromAllDocuments, cancellationToken).ConfigureAwait(false);
220var solutionAfterNamespaceChange = annotatedSolution;
232var solutionAfterFirstMerge = await MergeDiffAsync(solution, solutionAfterNamespaceChange, cancellationToken).ConfigureAwait(false);
251var solutionAfterImportsRemoved = await RemoveUnnecessaryImportsAsync(
269Solution solution,
311protected static async Task<Solution> AnnotateContainersAsync(Solution solution, ImmutableArray<(DocumentId, SyntaxNode)> containers, CancellationToken cancellationToken)
348var solution = document.Project.Solution;
427private async Task<(Solution, ImmutableArray<DocumentId>)> ChangeNamespaceInSingleDocumentAsync(
428Solution solution,
471var solutionWithChangedNamespace = documentWithNewNamespace.Project.Solution;
484var solutionWithFixedReferences = await MergeDocumentChangesAsync(solutionWithChangedNamespace, fixedDocuments, cancellationToken).ConfigureAwait(false);
489private static async Task<Solution> MergeDocumentChangesAsync(Solution originalSolution, Document[] changedDocuments, CancellationToken cancellationToken)
760private static async Task<Solution> RemoveUnnecessaryImportsAsync(
761Solution solution,
855private static async Task<Solution> MergeDiffAsync(Solution oldSolution, Solution newSolution, CancellationToken cancellationToken)
Diagnostics\IDiagnosticAnalyzerService.cs (6)
43Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(Solution solution, ProjectId? projectId = null, DocumentId? documentId = null, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default);
48Task ForceAnalyzeAsync(Solution solution, Action<Project> onProjectAnalyzed, ProjectId? projectId = null, CancellationToken cancellationToken = default);
57/// Note that for project case, this method returns diagnostics from all project documents as well. Use <see cref="GetProjectDiagnosticsForIdsAsync(Solution, ProjectId, ImmutableHashSet{string}, bool, CancellationToken)"/>
60Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForIdsAsync(Solution solution, ProjectId? projectId = null, DocumentId? documentId = null, ImmutableHashSet<string>? diagnosticIds = null, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default);
64/// Note that this method doesn't return any document diagnostics. Use <see cref="GetDiagnosticsForIdsAsync(Solution, ProjectId, DocumentId, ImmutableHashSet{string}, bool, CancellationToken)"/> to also fetch those.
66Task<ImmutableArray<DiagnosticData>> GetProjectDiagnosticsForIdsAsync(Solution solution, ProjectId? projectId = null, ImmutableHashSet<string>? diagnosticIds = null, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default);
EditAndContinue\DebuggingSession.cs (8)
107Solution solution,
164private void StorePendingUpdate(Solution solution, SolutionUpdate update)
524Solution solution,
623public async ValueTask<ImmutableArray<ImmutableArray<ActiveStatementSpan>>> GetBaseActiveStatementSpansAsync(Solution solution, ImmutableArray<DocumentId> documentIds, CancellationToken cancellationToken)
785var newSolution = newProject.Solution;
851Solution solution, ActiveStatementSpanProvider activeStatementSpanProvider, ManagedInstructionId instructionId, CancellationToken cancellationToken)
924public async ValueTask<bool?> IsActiveStatementInExceptionRegionAsync(Solution solution, ManagedInstructionId instructionId, CancellationToken cancellationToken)
974Solution newSolution,
EditAndContinue\EditAndContinueWorkspaceService.cs (6)
117Solution solution,
162private static IEnumerable<(Project, IEnumerable<DocumentState>)> GetDocumentStatesGroupedByProject(Solution solution, ImmutableArray<DocumentId> documentIds)
201Solution solution,
230public ValueTask<ImmutableArray<ImmutableArray<ActiveStatementSpan>>> GetBaseActiveStatementSpansAsync(DebuggingSessionId sessionId, Solution solution, ImmutableArray<DocumentId> documentIds, CancellationToken cancellationToken)
252public ValueTask<LinePositionSpan?> GetCurrentActiveStatementPositionAsync(DebuggingSessionId sessionId, Solution solution, ActiveStatementSpanProvider activeStatementSpanProvider, ManagedInstructionId instructionId, CancellationToken cancellationToken)
265public ValueTask<bool?> IsActiveStatementInExceptionRegionAsync(DebuggingSessionId sessionId, Solution solution, ManagedInstructionId instructionId, CancellationToken cancellationToken)
EditAndContinue\IEditAndContinueWorkspaceService.cs (5)
17ValueTask<EmitSolutionUpdateResults> EmitSolutionUpdateAsync(DebuggingSessionId sessionId, Solution solution, ActiveStatementSpanProvider activeStatementSpanProvider, CancellationToken cancellationToken);
22ValueTask<DebuggingSessionId> StartDebuggingSessionAsync(Solution solution, IManagedHotReloadService debuggerService, IPdbMatchingSourceTextProvider sourceTextProvider, ImmutableArray<DocumentId> captureMatchingDocuments, bool captureAllMatchingDocuments, bool reportDiagnostics, CancellationToken cancellationToken);
26ValueTask<bool?> IsActiveStatementInExceptionRegionAsync(DebuggingSessionId sessionId, Solution solution, ManagedInstructionId instructionId, CancellationToken cancellationToken);
27ValueTask<LinePositionSpan?> GetCurrentActiveStatementPositionAsync(DebuggingSessionId sessionId, Solution solution, ActiveStatementSpanProvider activeStatementSpanProvider, ManagedInstructionId instructionId, CancellationToken cancellationToken);
29ValueTask<ImmutableArray<ImmutableArray<ActiveStatementSpan>>> GetBaseActiveStatementSpansAsync(DebuggingSessionId sessionId, Solution solution, ImmutableArray<DocumentId> documentIds, CancellationToken cancellationToken);
EditAndContinue\Remote\RemoteDebuggingSessionProxy.cs (5)
66public async ValueTask EndDebuggingSessionAsync(Solution compileTimeSolution, EditAndContinueDiagnosticUpdateSource diagnosticUpdateSource, IDiagnosticAnalyzerService diagnosticService, CancellationToken cancellationToken)
101Solution solution,
210public async ValueTask<LinePositionSpan?> GetCurrentActiveStatementPositionAsync(Solution solution, ActiveStatementSpanProvider activeStatementSpanProvider, ManagedInstructionId instructionId, CancellationToken cancellationToken)
227public async ValueTask<bool?> IsActiveStatementInExceptionRegionAsync(Solution solution, ManagedInstructionId instructionId, CancellationToken cancellationToken)
243public async ValueTask<ImmutableArray<ImmutableArray<ActiveStatementSpan>>> GetBaseActiveStatementSpansAsync(Solution solution, ImmutableArray<DocumentId> documentIds, CancellationToken cancellationToken)
EncapsulateField\AbstractEncapsulateFieldService.cs (14)
103public async Task<Solution> EncapsulateFieldsAsync(
112var solution = document.Project.Solution;
138private async Task<Solution> EncapsulateFieldsInCurrentProcessAsync(Document document, ImmutableArray<IFieldSymbol> fields, CleanCodeGenerationOptionsProvider fallbackOptions, bool updateReferences, CancellationToken cancellationToken)
143var currentSolution = document.Project.Solution;
154var nextSolution = await EncapsulateFieldAsync(document, currentField, updateReferences, fallbackOptions, cancellationToken).ConfigureAwait(false);
164private async Task<Solution> EncapsulateFieldAsync(
180var solution = document.Project.Solution;
208var solutionNeedingProperty = await UpdateReferencesAsync(
257private async Task<Solution> UpdateReferencesAsync(
258bool updateReferences, Solution solution, Document document, IFieldSymbol field, string finalFieldName, string generatedPropertyName, CodeCleanupOptionsProvider fallbackOptions, CancellationToken cancellationToken)
300private static async Task<Solution> RenameAsync(
301Solution solution,
339private ISet<(DocumentId documentId, TextSpan span)> GetConstructorLocations(Solution solution, INamedTypeSymbol containingType)
346Solution destinationSolution,
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (15)
178var solution = _registration.GetSolutionToAnalyze();
329private void EnqueueSolutionChangedEvent(Solution oldSolution, Solution newSolution, string eventName)
356private void EnqueueFullSolutionEvent(Solution solution, UnitTestingInvocationReasons invocationReasons, string eventName)
370private void EnqueueProjectChangedEvent(Solution oldSolution, Solution newSolution, ProjectId projectId, string eventName)
384private void EnqueueFullProjectEvent(Solution solution, ProjectId projectId, UnitTestingInvocationReasons invocationReasons, string eventName)
390private void EnqueueFullDocumentEvent(Solution solution, DocumentId documentId, UnitTestingInvocationReasons invocationReasons, string eventName)
402private void EnqueueDocumentChangedEvent(Solution oldSolution, Solution newSolution, DocumentId documentId, string eventName)
518var solution = _registration.GetSolutionToAnalyze();
637var solution = _workCoordinator._registration.GetSolutionToAnalyze();
688public string GetLanguagesStringForTelemetry(Solution solution)
734public int GetDocumentCount(Solution solution)
777public IEnumerable<(Project project, DocumentId documentId)> GetDocumentIds(Solution solution)
ExtractInterface\AbstractExtractInterfaceService.cs (17)
38protected abstract Task<Solution> UpdateMembersWithExplicitImplementationsAsync(
39Solution unformattedSolution,
143var solution = refactoringResult.DocumentToExtractFrom.Project.Solution;
179Solution solution, string containingNamespaceDisplay, INamedTypeSymbol extractedInterfaceSymbol,
200var completedUnformattedSolution = await GetSolutionWithOriginalTypeUpdatedAsync(
210var completedSolution = await GetFormattedSolutionAsync(
223Solution solution, ExtractInterfaceTypeAnalysisResult refactoringResult, INamedTypeSymbol extractedInterfaceSymbol,
242var unformattedSolution = documentWithInterface.Project.Solution;
245var unformattedSolutionWithUpdatedType = await GetSolutionWithOriginalTypeUpdatedAsync(
251var completedSolution = await GetFormattedSolutionAsync(
293private static async Task<Solution> GetFormattedSolutionAsync(Solution unformattedSolution, IEnumerable<DocumentId> documentIds, CodeCleanupOptionsProvider fallbackOptions, CancellationToken cancellationToken)
298var formattedSolution = unformattedSolution;
323private async Task<Solution> GetSolutionWithOriginalTypeUpdatedAsync(
324Solution solution,
341var unformattedSolution = solution;
368var updatedUnformattedSolution = await UpdateMembersWithExplicitImplementationsAsync(
FindUsages\IDefinitionsAndReferencesFactory.cs (9)
30Solution solution, DefinitionItem definitionItem, CancellationToken cancellationToken);
47Solution solution, DefinitionItem definitionItem, CancellationToken cancellationToken)
60Solution solution,
66Solution solution,
74Solution solution,
83Solution solution,
96this SymbolGroup group, IFindUsagesContext context, Solution solution, FindReferencesSearchOptions options, bool isPrimary, bool includeHiddenLocations, CancellationToken cancellationToken)
111Solution solution,
161private static ImmutableArray<DocumentSpan> TryGetSourceLocations(ISymbol definition, Solution solution, ImmutableArray<Location> locations, bool includeHiddenLocations)
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (11)
60var solution = project.Solution;
270Solution solution,
330Solution solution,
387Solution solution,
425Solution solution,
450Solution solution,
489Solution solution,
537Solution solution,
607Solution solution,
665Solution solution,
700private static DefinitionItem? ToSlimDefinitionItem(ISymbol symbol, Solution solution)
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (10)
81var fixedSolution = await RefactorAndMoveAsync(
129var solutionWithFixedReferences = await RefactorReferencesAsync(projectToLocations, newDoc.Project.Solution, newType, typeArgIndices, cancellationToken).ConfigureAwait(false);
142var movedSolution = await MembersPuller.PullMembersUpAsync(sourceDoc, pullMembersUpOptions, _fallbackOptions, cancellationToken).ConfigureAwait(false);
168private async Task<Solution> RefactorAndMoveAsync(
171Solution oldSolution,
190var solutionWithFixedReferences = await RefactorReferencesAsync(projectToLocations, oldSolution, newType, typeArgIndices, cancellationToken).ConfigureAwait(false);
211private static async Task<Solution> RefactorReferencesAsync(
213Solution solution,
219var updatedSolution = solution;
341Solution solution,
NavigationBar\AbstractNavigationBarItemService.cs (3)
44Solution solution, ISymbol symbol, SyntaxTree tree, Func<SyntaxReference, TextSpan> computeFullSpan)
50Solution solution, ISymbol symbol, SyntaxTree tree,
91Solution solution, ISymbol symbol, SyntaxTree tree, ISymbolDeclarationService symbolDeclarationService)
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (14)
158private async Task<Solution> ReplaceMethodsWithPropertyAsync(
170var originalSolution = project.Solution;
188var updatedSolution = originalSolution;
196private async Task<Solution> UpdateReferencesAsync(Solution updatedSolution, string propertyName, bool nameChanged, ILookup<Document, ReferenceLocation> getReferencesByDocument, ILookup<Document, ReferenceLocation> setReferencesByDocument, CancellationToken cancellationToken)
213private async Task<Solution> UpdateReferencesInDocumentAsync(
216Solution updatedSolution,
315private static async Task<Solution> ReplaceGetMethodsAndRemoveSetMethodsAsync(
316Solution originalSolution,
317Solution updatedSolution,
344private static async Task<Solution> ReplaceGetMethodsAndRemoveSetMethodsAsync(
347Solution updatedSolution,
403Solution updatedSolution,
451Solution originalSolution,
SolutionCrawler\WorkCoordinator.cs (16)
143var solution = _registration.GetSolutionToAnalyze();
154var solution = _registration.GetSolutionToAnalyze();
276private void EnqueueSolutionChangedEvent(Solution oldSolution, Solution newSolution, string eventName)
303private void EnqueueFullSolutionEvent(Solution solution, InvocationReasons invocationReasons, string eventName)
317private void EnqueueProjectChangedEvent(Solution oldSolution, Solution newSolution, ProjectId projectId, string eventName)
331private void EnqueueFullProjectEvent(Solution solution, ProjectId projectId, InvocationReasons invocationReasons, string eventName)
337private void EnqueueFullDocumentEvent(Solution solution, DocumentId documentId, InvocationReasons invocationReasons, string eventName)
349private void EnqueueDocumentChangedEvent(Solution oldSolution, Solution newSolution, DocumentId documentId, string eventName)
461var solution = _registration.GetSolutionToAnalyze();
570var solution = _workCoordinator._registration.GetSolutionToAnalyze();
621public string GetLanguagesStringForTelemetry(Solution solution)
667public int GetDocumentCount(Solution solution)
710public IEnumerable<(Project project, DocumentId documentId)> GetDocumentIds(Solution solution)
CodeActions\CodeAction.cs (27)
142Solution originalSolution, IProgressTracker progressTracker, CancellationToken cancellationToken)
151Solution originalSolution, IProgressTracker progressTracker, CancellationToken cancellationToken)
170Solution originalSolution, CancellationToken cancellationToken)
187var changedSolution = await GetChangedSolutionAsync(cancellationToken).ConfigureAwait(false);
214protected virtual async Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken)
225internal virtual Task<Solution?> GetChangedSolutionAsync(
247internal async Task<Solution?> GetChangedSolutionInternalAsync(Solution originalSolution, bool postProcessChanges = true, CancellationToken cancellationToken = default)
249var solution = await GetChangedSolutionAsync(new ProgressTracker(), cancellationToken).ConfigureAwait(false);
271Solution originalSolution, IEnumerable<CodeActionOperation> operations, CancellationToken cancellationToken)
295protected Task<Solution> PostProcessChangesAsync(Solution changedSolution, CancellationToken cancellationToken)
298internal async Task<Solution> PostProcessChangesAsync(
299Solution originalSolution,
300Solution changedSolution,
310var processedSolution = changedSolution;
410/// Creates a <see cref="CodeAction"/> for a change to more than one <see cref="Document"/> within a <see cref="Solution"/>.
414/// <param name="createChangedSolution">Function to create the <see cref="Solution"/>.</param>
417public static CodeAction Create(string title, Func<CancellationToken, Task<Solution>> createChangedSolution, string? equivalenceKey = null)
460internal static CodeAction CreateWithPriority(CodeActionPriority priority, string title, Func<CancellationToken, Task<Solution>> createChangedSolution, string equivalenceKey)
588private readonly Func<CancellationToken, Task<Solution>> _createChangedSolution;
592Func<CancellationToken, Task<Solution>> createChangedSolution,
603Func<CancellationToken, Task<Solution>> createChangedSolution,
612Func<CancellationToken, Task<Solution>> createChangedSolution,
617protected sealed override Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken)
638protected sealed override Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken)
639=> SpecializedTasks.Null<Solution>();
FindSymbols\Declarations\DeclarationFinder_SourceDeclarations.cs (4)
28Solution solution, string name, bool ignoreCase, SymbolFilter criteria, CancellationToken cancellationToken)
104Solution solution, string pattern, SymbolFilter criteria, CancellationToken cancellationToken)
178Solution solution, string name, bool ignoreCase, SymbolFilter criteria, CancellationToken cancellationToken)
240Solution solution, string pattern, SymbolFilter criteria, CancellationToken cancellationToken)
FindSymbols\FindReferences\DependentProjectsFinder.cs (6)
27Solution solution, ImmutableArray<ISymbol> symbols, IImmutableSet<Project> projects, CancellationToken cancellationToken)
58Solution solution, ImmutableArray<ISymbol> symbols, CancellationToken cancellationToken)
89Solution solution, ImmutableArray<ISymbol> symbols, CancellationToken cancellationToken)
111Solution solution,
137Solution solution, Project? sourceProject, HashSet<(Project project, bool hasInternalsAccess)> dependentProjects, CancellationToken cancellationToken)
210Solution solution,
FindSymbols\FindReferences\Finders\MethodTypeParameterSymbolReferenceFinder.cs (1)
20Solution solution,
FindSymbols\FindReferences\Finders\PropertyAccessorSymbolReferenceFinder.cs (1)
22Solution solution,
FindSymbols\SymbolFinder_Declarations_CustomQueries.cs (3)
28public static Task<IEnumerable<ISymbol>> FindSourceDeclarationsAsync(Solution solution, Func<string, bool> predicate, CancellationToken cancellationToken = default)
34public static async Task<IEnumerable<ISymbol>> FindSourceDeclarationsAsync(Solution solution, Func<string, bool> predicate, SymbolFilter filter, CancellationToken cancellationToken = default)
44Solution solution, SearchQuery query, SymbolFilter filter, CancellationToken cancellationToken)
FindSymbols\SymbolFinder_Declarations_SourceDeclarations.cs (4)
20public static Task<IEnumerable<ISymbol>> FindSourceDeclarationsAsync(Solution solution, string name, bool ignoreCase, CancellationToken cancellationToken = default)
27Solution solution, string name, bool ignoreCase, SymbolFilter filter, CancellationToken cancellationToken = default)
67public static Task<IEnumerable<ISymbol>> FindSourceDeclarationsWithPatternAsync(Solution solution, string pattern, CancellationToken cancellationToken = default)
78Solution solution, string pattern, SymbolFilter filter, CancellationToken cancellationToken = default)
FindSymbols\SymbolFinder_Hierarchy.cs (21)
27ISymbol symbol, Solution solution, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default)
37ISymbol symbol, Solution solution, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default)
68internal static async Task<bool> IsOverrideAsync(Solution solution, ISymbol member, ISymbol symbol, CancellationToken cancellationToken)
83ISymbol symbol, Solution solution, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default)
92ISymbol symbol, Solution solution, CancellationToken cancellationToken)
105Solution solution,
194/// "derived", but can be found with <see cref="FindImplementationsAsync(ISymbol, Solution,
204INamedTypeSymbol type, Solution solution, IImmutableSet<Project>? projects, CancellationToken cancellationToken)
211/// "derived", but can be found with <see cref="FindImplementationsAsync(ISymbol, Solution,
222INamedTypeSymbol type, Solution solution, bool transitive = true, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default)
234/// <inheritdoc cref="FindDerivedClassesArrayAsync(INamedTypeSymbol, Solution, bool, IImmutableSet{Project}, CancellationToken)"/>
237INamedTypeSymbol type, Solution solution, bool transitive, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default)
258INamedTypeSymbol type, Solution solution, bool transitive = true, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default)
270/// <inheritdoc cref="FindDerivedInterfacesAsync(INamedTypeSymbol, Solution, bool, IImmutableSet{Project}, CancellationToken)"/>
273INamedTypeSymbol type, Solution solution, bool transitive, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default)
294INamedTypeSymbol type, Solution solution, bool transitive = true, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default)
306/// <inheritdoc cref="FindImplementationsAsync(INamedTypeSymbol, Solution, bool, IImmutableSet{Project}, CancellationToken)"/>
309INamedTypeSymbol type, Solution solution, bool transitive, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default)
323ISymbol symbol, Solution solution, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default)
342/// <inheritdoc cref="FindImplementationsAsync(ISymbol, Solution, IImmutableSet{Project}, CancellationToken)"/>
347ISymbol symbol, Solution solution, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default)
ISolutionExtensions.cs (11)
14public static IEnumerable<DocumentId> GetChangedDocuments(this Solution? newSolution, Solution oldSolution)
30public static TextDocument? GetTextDocument(this Solution solution, DocumentId? documentId)
33public static Document GetRequiredDocument(this Solution solution, SyntaxTree syntaxTree)
36public static Project GetRequiredProject(this Solution solution, ProjectId projectId)
47public static Document GetRequiredDocument(this Solution solution, DocumentId documentId)
51public static async Task<Document> GetRequiredDocumentAsync(this Solution solution, DocumentId documentId, bool includeSourceGenerated = false, CancellationToken cancellationToken = default)
54public static async Task<TextDocument> GetRequiredTextDocumentAsync(this Solution solution, DocumentId documentId, CancellationToken cancellationToken = default)
58public static TextDocument GetRequiredAdditionalDocument(this Solution solution, DocumentId documentId)
61public static TextDocument GetRequiredAnalyzerConfigDocument(this Solution solution, DocumentId documentId)
64public static TextDocument GetRequiredTextDocument(this Solution solution, DocumentId documentId)
Remote\RemoteArguments.cs (6)
66Solution solution, ISymbol symbol, CancellationToken cancellationToken)
78ISymbol symbol, Solution solution, CancellationToken cancellationToken,
106Solution solution, CancellationToken cancellationToken)
190Solution solution, CancellationToken cancellationToken)
207Solution solution, CancellationToken cancellationToken)
257public static SerializableSymbolGroup Dehydrate(Solution solution, SymbolGroup group, CancellationToken cancellationToken)
Remote\RemoteHostClient.cs (10)
108Solution solution,
118Solution solution,
130/// Equivalent to <see cref="TryInvokeAsync{TService}(Solution, Func{TService, Checksum, CancellationToken, ValueTask}, CancellationToken)"/>
146/// Equivalent to <see cref="TryInvokeAsync{TService}(Solution, Func{TService, Checksum, CancellationToken, ValueTask}, CancellationToken)"/>
164Solution solution,
175Solution solution,
188/// Equivalent to <see cref="TryInvokeAsync{TService}(Solution, Func{TService, Checksum, RemoteServiceCallbackId, CancellationToken, ValueTask}, object, CancellationToken)"/>
205/// Equivalent to <see cref="TryInvokeAsync{TService}(Solution, Func{TService, Checksum, RemoteServiceCallbackId, CancellationToken, ValueTask}, object, CancellationToken)"/>
224Solution solution1,
225Solution solution2,
Rename\IRenameRewriterLanguageService.cs (4)
57Solution baseSolution,
58Solution newSolution,
126public abstract Task<ImmutableArray<Location>> ComputeDeclarationConflictsAsync(string replacementText, ISymbol renamedSymbol, ISymbol renameSymbol, IEnumerable<ISymbol> referencedSymbols, Solution baseSolution, Solution newSolution, IDictionary<Location, Location> reverseMappedLocations, CancellationToken cancellationToken);
Rename\Renamer.cs (7)
42public static Task<Solution> RenameSymbolAsync(Solution solution, ISymbol symbol, string newName, OptionSet? optionSet, CancellationToken cancellationToken = default)
45public static async Task<Solution> RenameSymbolAsync(
46Solution solution, ISymbol symbol, SymbolRenameOptions options, string newName, CancellationToken cancellationToken = default)
151internal static Task<LightweightRenameLocations> FindRenameLocationsAsync(Solution solution, ISymbol symbol, SymbolRenameOptions options, CodeCleanupOptionsProvider fallbackOptions, CancellationToken cancellationToken)
155Solution solution,
203Solution solution,
Rename\Renamer.RenameDocumentActionSet.cs (11)
20/// document metadata will still be updated by calling <see cref="UpdateSolutionAsync(Solution, ImmutableArray{RenameDocumentAction}, CancellationToken)"/>
22/// To apply all actions use <see cref="UpdateSolutionAsync(Solution, CancellationToken)"/>, or use a subset
23/// of the actions by calling <see cref="UpdateSolutionAsync(Solution, ImmutableArray{RenameDocumentAction}, CancellationToken)"/>.
50/// contents rather than metadata. Document metadata will still not be updated unless <see cref="UpdateSolutionAsync(Solution, ImmutableArray{RenameDocumentAction}, CancellationToken)" />
56/// Same as calling <see cref="UpdateSolutionAsync(Solution, ImmutableArray{RenameDocumentAction}, CancellationToken)"/> with
59public Task<Solution> UpdateSolutionAsync(Solution solution, CancellationToken cancellationToken)
71/// immediately call <see cref="UpdateSolutionAsync(Solution, ImmutableArray{RenameDocumentAction}, CancellationToken)"/> without
74public async Task<Solution> UpdateSolutionAsync(Solution solution, ImmutableArray<RenameDocumentAction> actions, CancellationToken cancellationToken)
114private Document GetDocument(Solution solution)
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (5)
31ISymbol referencedSymbol, ISymbol originalSymbol, Solution solution, bool considerSymbolReferences, CancellationToken cancellationToken)
125ISymbol symbol, Solution solution, CancellationToken cancellationToken)
150ISymbol referencedSymbol, ISymbol originalSymbol, Solution solution, CancellationToken cancellationToken)
231internal static async Task<IEnumerable<RenameLocation>> GetRenamableReferenceLocationsAsync(ISymbol referencedSymbol, ISymbol originalSymbol, ReferenceLocation location, Solution solution, CancellationToken cancellationToken)
314Solution solution,
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (10)
66private readonly Func<Solution, DocumentId, bool> _documentAlreadyInWorkspace;
69private readonly Func<Solution, DocumentId, TextLoader, Solution> _documentTextLoaderChangedAction;
73Func<Solution, DocumentId, bool> documentAlreadyInWorkspace,
76Func<Solution, DocumentId, TextLoader, Solution> documentTextLoaderChangedAction,
535Func<Solution, ImmutableArray<DocumentInfo>, Solution> addDocuments,
537Func<Solution, ImmutableArray<DocumentId>, Solution> removeDocuments,
Workspace\Solution\Solution.cs (87)
126private static readonly Func<ProjectId, Solution, Project> s_createProjectFunction = CreateProject;
127private static Project CreateProject(ProjectId projectId, Solution solution)
321public Solution AddProject(ProjectId projectId, string name, string assemblyName, string language)
327public Solution AddProject(ProjectInfo projectInfo)
341public Solution RemoveProject(ProjectId projectId)
356public Solution WithProjectAssemblyName(ProjectId projectId, string assemblyName)
377public Solution WithProjectOutputFilePath(ProjectId projectId, string? outputFilePath)
393public Solution WithProjectOutputRefFilePath(ProjectId projectId, string? outputRefFilePath)
409public Solution WithProjectCompilationOutputInfo(ProjectId projectId, in CompilationOutputInfo info)
425public Solution WithProjectDefaultNamespace(ProjectId projectId, string? defaultNamespace)
441internal Solution WithProjectChecksumAlgorithm(ProjectId projectId, SourceHashAlgorithm checksumAlgorithm)
457public Solution WithProjectName(ProjectId projectId, string name)
478public Solution WithProjectFilePath(ProjectId projectId, string? filePath)
495public Solution WithProjectCompilationOptions(ProjectId projectId, CompilationOptions options)
517public Solution WithProjectParseOptions(ProjectId projectId, ParseOptions options)
540internal Solution WithHasAllInformation(ProjectId projectId, bool hasAllInformation)
558internal Solution WithRunAnalyzers(ProjectId projectId, bool runAnalyzers)
580public Solution WithProjectDocumentsOrder(ProjectId projectId, ImmutableList<DocumentId> documentIds)
606public Solution AddProjectReference(ProjectId projectId, ProjectReference projectReference)
623public Solution AddProjectReferences(ProjectId projectId, IEnumerable<ProjectReference> projectReferences)
659public Solution RemoveProjectReference(ProjectId projectId, ProjectReference projectReference)
687public Solution WithProjectReferences(ProjectId projectId, IEnumerable<ProjectReference>? projectReferences)
714public Solution AddMetadataReference(ProjectId projectId, MetadataReference metadataReference)
730public Solution AddMetadataReferences(ProjectId projectId, IEnumerable<MetadataReference> metadataReferences)
763public Solution RemoveMetadataReference(ProjectId projectId, MetadataReference metadataReference)
789public Solution WithProjectMetadataReferences(ProjectId projectId, IEnumerable<MetadataReference> metadataReferences)
812public Solution AddAnalyzerReference(ProjectId projectId, AnalyzerReference analyzerReference)
828public Solution AddAnalyzerReferences(ProjectId projectId, IEnumerable<AnalyzerReference> analyzerReferences)
866public Solution RemoveAnalyzerReference(ProjectId projectId, AnalyzerReference analyzerReference)
892public Solution WithProjectAnalyzerReferences(ProjectId projectId, IEnumerable<AnalyzerReference> analyzerReferences)
912public Solution AddAnalyzerReference(AnalyzerReference analyzerReference)
925public Solution AddAnalyzerReferences(IEnumerable<AnalyzerReference> analyzerReferences)
955public Solution RemoveAnalyzerReference(AnalyzerReference analyzerReference)
976public Solution WithAnalyzerReferences(IEnumerable<AnalyzerReference> analyzerReferences)
996public Solution AddDocument(DocumentId documentId, string name, string text, IEnumerable<string>? folders = null, string? filePath = null)
1014public Solution AddDocument(DocumentId documentId, string name, SourceText text, IEnumerable<string>? folders = null, string? filePath = null, bool isGenerated = false)
1033public Solution AddDocument(DocumentId documentId, string name, SyntaxNode syntaxRoot, IEnumerable<string>? folders = null, string? filePath = null, bool isGenerated = false, PreservationMode preservationMode = PreservationMode.PreserveValue)
1051private Solution AddDocumentImpl(ProjectState project, DocumentId documentId, string name, SourceText text, IReadOnlyList<string>? folders, string? filePath, bool isGenerated)
1065public Solution AddDocument(DocumentId documentId, string name, TextLoader loader, IEnumerable<string>? folders = null)
1090public Solution AddDocument(DocumentInfo documentInfo)
1094/// Create a new <see cref="Solution"/> instance with the corresponding <see cref="Project"/>s updated to include
1097/// <returns>A new <see cref="Solution"/> with the documents added.</returns>
1098public Solution AddDocuments(ImmutableArray<DocumentInfo> documentInfos)
1113public Solution AddAdditionalDocument(DocumentId documentId, string name, string text, IEnumerable<string>? folders = null, string? filePath = null)
1120public Solution AddAdditionalDocument(DocumentId documentId, string name, SourceText text, IEnumerable<string>? folders = null, string? filePath = null)
1141public Solution AddAdditionalDocument(DocumentInfo documentInfo)
1144public Solution AddAdditionalDocuments(ImmutableArray<DocumentInfo> documentInfos)
1159public Solution AddAnalyzerConfigDocument(DocumentId documentId, string name, SourceText text, IEnumerable<string>? folders = null, string? filePath = null)
1204public Solution AddAnalyzerConfigDocuments(ImmutableArray<DocumentInfo> documentInfos)
1218public Solution RemoveDocument(DocumentId documentId)
1227public Solution RemoveDocuments(ImmutableArray<DocumentId> documentIds)
1233private Solution RemoveDocumentsImpl(ImmutableArray<DocumentId> documentIds)
1247public Solution RemoveAdditionalDocument(DocumentId documentId)
1256public Solution RemoveAdditionalDocuments(ImmutableArray<DocumentId> documentIds)
1262private Solution RemoveAdditionalDocumentsImpl(ImmutableArray<DocumentId> documentIds)
1276public Solution RemoveAnalyzerConfigDocument(DocumentId documentId)
1285public Solution RemoveAnalyzerConfigDocuments(ImmutableArray<DocumentId> documentIds)
1291private Solution RemoveAnalyzerConfigDocumentsImpl(ImmutableArray<DocumentId> documentIds)
1305public Solution WithDocumentName(DocumentId documentId, string name)
1327public Solution WithDocumentFolders(DocumentId documentId, IEnumerable<string>? folders)
1345public Solution WithDocumentFilePath(DocumentId documentId, string filePath)
1370public Solution WithDocumentText(DocumentId documentId, SourceText text, PreservationMode mode = PreservationMode.PreserveValue)
1397public Solution WithAdditionalDocumentText(DocumentId documentId, SourceText text, PreservationMode mode = PreservationMode.PreserveValue)
1424public Solution WithAnalyzerConfigDocumentText(DocumentId documentId, SourceText text, PreservationMode mode = PreservationMode.PreserveValue)
1451public Solution WithDocumentText(DocumentId documentId, TextAndVersion textAndVersion, PreservationMode mode = PreservationMode.PreserveValue)
1478public Solution WithAdditionalDocumentText(DocumentId documentId, TextAndVersion textAndVersion, PreservationMode mode = PreservationMode.PreserveValue)
1505public Solution WithAnalyzerConfigDocumentText(DocumentId documentId, TextAndVersion textAndVersion, PreservationMode mode = PreservationMode.PreserveValue)
1532public Solution WithDocumentSyntaxRoot(DocumentId documentId, SyntaxNode root, PreservationMode mode = PreservationMode.PreserveValue)
1555internal Solution WithDocumentContentsFrom(DocumentId documentId, DocumentState documentState)
1565public Solution WithDocumentSourceCodeKind(DocumentId documentId, SourceCodeKind sourceCodeKind)
1594public Solution WithDocumentTextLoader(DocumentId documentId, TextLoader loader, PreservationMode mode)
1621public Solution WithAdditionalDocumentTextLoader(DocumentId documentId, TextLoader loader, PreservationMode mode)
1648public Solution WithAnalyzerConfigDocumentTextLoader(DocumentId documentId, TextLoader loader, PreservationMode mode)
1679internal Solution WithFrozenPartialCompilationIncludingSpecificDocument(DocumentId documentId, CancellationToken cancellationToken)
1685internal async Task<Solution> WithMergedLinkedFileChangesAsync(
1686Solution oldSolution,
1702internal Solution WithNewWorkspace(string? workspaceKind, int workspaceVersion, SolutionServices services)
1718public Solution GetIsolatedSolution()
1727public Solution WithDocumentText(IEnumerable<DocumentId?> documentIds, SourceText text, PreservationMode mode = PreservationMode.PreserveValue)
1761var newSolution = newState != _state ? new Solution(newState) : this;
1772internal Solution WithoutFrozenSourceGeneratedDocuments()
1791internal Solution WithCachedSourceGeneratorState(ProjectId projectToUpdate, Project projectWithCachedGeneratorState)
1806public SolutionChanges GetChanges(Solution oldSolution)
1817/// Gets the set of <see cref="DocumentId"/>s in this <see cref="Solution"/> with a
1828/// Returns the options that should be applied to this solution. This is equivalent to <see cref="Workspace.Options" /> when the <see cref="Solution"/>
1841public Solution WithOptions(OptionSet options)
1854internal Solution WithOptions(SolutionOptionSet options)
Workspace\Workspace.cs (115)
33/// workspace's <see cref="TryApplyChanges(Solution)"/> method.
51private Solution _latestSolution;
60/// when they are applied to workspace via <see cref="TryApplyChanges(Solution, IProgressTracker)"/>.
113protected internal Solution CreateSolution(SolutionInfo solutionInfo)
122private Solution CreateSolution(SolutionInfo solutionInfo, SolutionOptionSet options, IReadOnlyList<AnalyzerReference> analyzerReferences)
128protected internal Solution CreateSolution(SolutionId id)
138/// after <see cref="TryApplyChanges(Solution)"/> is called.
140public Solution CurrentSolution
155protected Solution SetCurrentSolution(Solution solution)
167private protected (Solution oldSolution, Solution newSolution) SetCurrentSolutionEx(Solution solution)
174var oldSolution = this.CurrentSolution;
186/// <inheritdoc cref="SetCurrentSolution(Func{Solution, Solution}, Func{Solution, Solution, WorkspaceChangeKind}, ProjectId?, DocumentId?, Action{Solution, Solution}?, Action{Solution, Solution}?)"/>
188Func<Solution, Solution> transformation,
192Action<Solution, Solution>? onBeforeUpdate = null,
193Action<Solution, Solution>? onAfterUpdate = null)
220private protected (bool updated, Solution newSolution) SetCurrentSolution(
221Func<Solution, Solution> transformation,
222Func<Solution, Solution, WorkspaceChangeKind> changeKind,
225Action<Solution, Solution>? onBeforeUpdate = null,
226Action<Solution, Solution>? onAfterUpdate = null)
231var newSolution = data.transformation(oldSolution);
258static Solution UnifyLinkedDocumentContents(Solution oldSolution, Solution newSolution)
289static Solution UpdateAddedDocumentToExistingContentsInSolution(Solution solution, DocumentId addedDocumentId)
301static Solution UpdateExistingDocumentsToChangedDocumentContents(Solution solution, DocumentId changedDocumentId, HashSet<DocumentId> processedDocuments)
329/// name="transformation"/> as it will have its <see cref="Solution.WorkspaceVersion"/> updated
334/// name="transformation"/> as it will have its <see cref="Solution.WorkspaceVersion"/> updated
336private protected (Solution oldSolution, Solution newSolution) SetCurrentSolution<TData>(
337Func<Solution, TData, Solution> transformation,
339Action<Solution, Solution, TData>? onBeforeUpdate = null,
340Action<Solution, Solution, TData>? onAfterUpdate = null)
344var oldSolution = Volatile.Read(ref _latestSolution);
353var newSolution = transformation(oldSolution, data);
384/// Gets or sets the set of all global options and <see cref="Solution.Options"/>.
385/// Setter also force updates the <see cref="CurrentSolution"/> to have the updated <see cref="Solution.Options"/>.
537private static Solution CheckAndAddProject(Solution newSolution, ProjectInfo project)
553var newSolution = this.CreateSolution(solutionInfo);
570var newSolution = this.CreateSolution(reloadedSolutionInfo);
888var newSolution = oldSolution;
1012Action<Solution, DocumentId> checkIsInSolution,
1013Func<Solution, DocumentId, TArg, Solution> updateSolutionWithText,
1030var newSolution = oldSolution;
1031var previousSolution = newSolution;
1195static Solution UpdateReferencesAfterAdd(Solution solution)
1252/// Determines if the specific kind of change is supported by the <see cref="TryApplyChanges(Solution)"/> method.
1274public virtual bool TryApplyChanges(Solution newSolution)
1277internal virtual bool TryApplyChanges(Solution newSolution, IProgressTracker progressTracker)
1288var oldSolution = this.CurrentSolution;
1311var solutionWithLinkedFileChangesMerged = newSolution.WithMergedLinkedFileChangesAsync(oldSolution, solutionChanges, cancellationToken: CancellationToken.None).Result;
1538/// Called during a call to <see cref="TryApplyChanges(Solution)"/> to determine if a specific change to <see cref="Project.CompilationOptions"/> is allowed.
1545/// <param name="newOptions">The new <see cref="CompilationOptions"/> of the project that was passed to <see cref="TryApplyChanges(Solution)"/>.</param>
1546/// <param name="project">The project contained in the <see cref="Solution"/> passed to <see cref="TryApplyChanges(Solution)"/>.</param>
1551/// Called during a call to <see cref="TryApplyChanges(Solution)"/> to determine if a specific change to <see cref="Project.ParseOptions"/> is allowed.
1558/// <param name="newOptions">The new <see cref="ParseOptions"/> of the project that was passed to <see cref="TryApplyChanges(Solution)"/>.</param>
1559/// <param name="project">The project contained in the <see cref="Solution"/> passed to <see cref="TryApplyChanges(Solution)"/>.</param>
1564/// This method is called during <see cref="TryApplyChanges(Solution)"/> for each project
1747private static void CheckNoChanges(Solution oldSolution, Solution newSolution)
1786/// This method is called during <see cref="TryApplyChanges(Solution)"/> to add a project to the current solution.
1797/// This method is called during <see cref="TryApplyChanges(Solution)"/> to remove a project from the current solution.
1808/// This method is called during <see cref="TryApplyChanges(Solution)"/> to change the compilation options.
1826/// This method is called during <see cref="TryApplyChanges(Solution)"/> to change the parse options.
1843/// This method is called during <see cref="TryApplyChanges(Solution)"/> to add a project reference to a project.
1854/// This method is called during <see cref="TryApplyChanges(Solution)"/> to remove a project reference from a project.
1865/// This method is called during <see cref="TryApplyChanges(Solution)"/> to add a metadata reference to a project.
1876/// This method is called during <see cref="TryApplyChanges(Solution)"/> to remove a metadata reference from a project.
1887/// This method is called during <see cref="TryApplyChanges(Solution)"/> to add an analyzer reference to a project.
1898/// This method is called during <see cref="TryApplyChanges(Solution)"/> to remove an analyzer reference from a project.
1909/// This method is called during <see cref="TryApplyChanges(Solution)"/> to add an analyzer reference to the solution.
1920/// This method is called during <see cref="TryApplyChanges(Solution)"/> to remove an analyzer reference from the solution.
1931/// This method is called during <see cref="TryApplyChanges(Solution)"/> to add a new document to a project.
1942/// This method is called during <see cref="TryApplyChanges(Solution)"/> to remove a document from a project.
1975/// This method is called during <see cref="TryApplyChanges(Solution)"/> to add a new additional document to a project.
1986/// This method is called during <see cref="TryApplyChanges(Solution)"/> to remove an additional document from a project.
2008/// This method is called during <see cref="TryApplyChanges(Solution)"/> to add a new analyzer config document to a project.
2019/// This method is called during <see cref="TryApplyChanges(Solution)"/> to remove an analyzer config document from a project.
2049private static void CheckSolutionIsEmpty(Solution solution)
2063private static void CheckProjectIsInSolution(Solution solution, ProjectId projectId)
2079private static void CheckProjectIsNotInSolution(Solution solution, ProjectId projectId)
2176internal static void CheckSolutionHasAnalyzerReference(Solution solution, AnalyzerReference analyzerReference)
2187internal static void CheckSolutionDoesNotHaveAnalyzerReference(Solution solution, AnalyzerReference analyzerReference)
2201private static void CheckDocumentIsInSolution(Solution solution, DocumentId documentId)
2217private static void CheckAdditionalDocumentIsInSolution(Solution solution, DocumentId documentId)
2233private static void CheckAnalyzerConfigDocumentIsInSolution(Solution solution, DocumentId documentId)
2262private static void CheckAdditionalDocumentIsNotInSolution(Solution solution, DocumentId documentId)
2278private static void CheckAnalyzerConfigDocumentIsNotInSolution(Solution solution, DocumentId documentId)
Workspace\Workspace_Editor.cs (15)
522Action<Solution, DocumentId> checkTextDocumentIsInSolution,
523Func<Solution, DocumentId, SourceText, PreservationMode, Solution> withDocumentText,
524Func<Solution, DocumentId, TextAndVersion, PreservationMode, Solution> withDocumentTextAndVersion,
651Action<Solution, DocumentId> checkTextDocumentIsInSolution,
652Func<Solution, DocumentId, TextLoader, PreservationMode, Solution> withTextDocumentTextLoader)
734private SourceText GetOpenDocumentText(Solution solution, DocumentId documentId)
747protected virtual Solution AdjustReloadedSolution(Solution oldSolution, Solution reloadedSolution)
749var newSolution = reloadedSolution;
766var oldSolution = oldProject.Solution;
767var newSolution = reloadedProject.Solution;
CodeCleanup\AbstractCodeCleanUpFixer.cs (10)
130var solution = _workspace.CurrentSolution;
147private Task<bool> FixSolutionAsync(Solution solution, ICodeCleanUpExecutionContext context)
152Task<Solution> ApplyFixAsync(ProgressTracker progressTracker, CancellationToken cancellationToken)
163async Task<Solution> ApplyFixAsync(ProgressTracker progressTracker, CancellationToken cancellationToken)
175async Task<Solution> ApplyFixAsync(ProgressTracker progressTracker, CancellationToken cancellationToken)
203async Task<Solution> ApplyFixAsync(ProgressTracker progressTracker, CancellationToken cancellationToken)
216Func<ProgressTracker, CancellationToken, Task<Solution>> applyFixAsync,
240var solution = await applyFixAsync(progressTracker, cancellationToken).ConfigureAwait(true);
248private async Task<Solution> FixSolutionAsync(
249Solution solution,
CodeLens\RemoteCodeLensReferencesService.cs (7)
37public ValueTask<VersionStamp> GetProjectCodeLensVersionAsync(Solution solution, ProjectId projectId, CancellationToken cancellationToken)
43public async Task<ReferenceCount?> GetReferenceCountAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, int maxSearchResults,
68public async Task<ImmutableArray<ReferenceLocationDescriptor>?> FindReferenceLocationsAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode,
89public async Task<ImmutableArray<ReferenceMethodDescriptor>?> FindReferenceMethodsAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode,
114public async Task<string?> GetFullyQualifiedNameAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode,
140Solution solution, ImmutableArray<ReferenceLocationDescriptor> descriptors, CancellationToken cancellationToken)
254private static async Task<ImmutableArray<ReferenceLocationDescriptor>?> FindReferenceLocationsWorkerAsync(Solution solution, DocumentId documentId, SyntaxNode syntaxNode,
Preview\PreviewEngine.cs (8)
30private readonly Solution _newSolution;
31private readonly Solution _oldSolution;
43public Solution FinalSolution { get; private set; }
46public PreviewEngine(IThreadingContext threadingContext, string title, string helpString, string description, string topLevelItemName, Glyph topLevelGlyph, Solution newSolution, Solution oldSolution, IComponentModel componentModel, bool showCheckBoxes = true)
58Solution newSolution,
59Solution oldSolution,
217var updatedSolution = _topLevelChange.GetUpdatedSolution(applyingChanges: false);
Progression\GraphBuilder.cs (14)
40private readonly Solution _solution;
42public GraphBuilder(Solution solution)
48Solution solution, IEnumerable<GraphNode> inputNodes, CancellationToken cancellationToken)
242internal static async Task<GraphNode> GetOrCreateNodeAsync(Graph graph, ISymbol symbol, Solution solution, CancellationToken cancellationToken)
296private static async Task<GraphNode> GetOrCreateNodeForParameterAsync(Graph graph, IParameterSymbol parameterSymbol, Solution solution, CancellationToken cancellationToken)
309private static async Task<GraphNode> GetOrCreateNodeForLocalVariableAsync(Graph graph, ISymbol localSymbol, Solution solution, CancellationToken cancellationToken)
318private static async Task<GraphNode> GetOrCreateNodeAssemblyAsync(Graph graph, IAssemblySymbol assemblySymbol, Solution solution, CancellationToken cancellationToken)
327private static void UpdateLabelsForNode(ISymbol symbol, Solution solution, GraphNode node)
541private static async Task<GraphNode> GetOrCreateNodeForNamespaceAsync(Graph graph, INamespaceSymbol symbol, Solution solution, CancellationToken cancellationToken)
550private static async Task<GraphNode> GetOrCreateNodeForNamedTypeAsync(Graph graph, INamedTypeSymbol namedType, Solution solution, CancellationToken cancellationToken)
603private static async Task<GraphNode> GetOrCreateNodeForMethodAsync(Graph graph, IMethodSymbol method, Solution solution, CancellationToken cancellationToken)
621private static async Task<GraphNode> GetOrCreateNodeForFieldAsync(Graph graph, IFieldSymbol field, Solution solution, CancellationToken cancellationToken)
640private static async Task<GraphNode> GetOrCreateNodeForPropertyAsync(Graph graph, IPropertySymbol property, Solution solution, CancellationToken cancellationToken)
653private static async Task<GraphNode> GetOrCreateNodeForEventAsync(Graph graph, IEventSymbol eventSymbol, Solution solution, CancellationToken cancellationToken)
Progression\GraphNodeIdCreation.cs (15)
37internal static async Task<GraphNodeId> GetIdForNamespaceAsync(INamespaceSymbol symbol, Solution solution, CancellationToken cancellationToken)
52internal static async Task<GraphNodeId> GetIdForTypeAsync(ITypeSymbol symbol, Solution solution, CancellationToken cancellationToken)
67private static async Task<IEnumerable<GraphNodeId>> GetPartialsForNamespaceAndTypeAsync(ITypeSymbol symbol, bool includeNamespace, Solution solution, CancellationToken cancellationToken, bool isInGenericArguments = false)
122private static async Task<GraphNodeId> GetPartialForTypeAsync(ITypeSymbol symbol, GraphNodeIdName nodeName, Solution solution, CancellationToken cancellationToken, bool isInGenericArguments = false)
154private static async Task<GraphNodeId> GetPartialForNamedTypeAsync(INamedTypeSymbol namedType, GraphNodeIdName nodeName, Solution solution, CancellationToken cancellationToken, bool isInGenericArguments = false)
212private static async Task<GraphNodeId> GetPartialForPointerTypeAsync(IPointerTypeSymbol pointerType, GraphNodeIdName nodeName, Solution solution, CancellationToken cancellationToken)
235private static async Task<GraphNodeId> GetPartialForArrayTypeAsync(IArrayTypeSymbol arrayType, GraphNodeIdName nodeName, Solution solution, CancellationToken cancellationToken)
256private static async Task<GraphNodeId> GetPartialForTypeParameterSymbolAsync(ITypeParameterSymbol typeParameterSymbol, GraphNodeIdName nodeName, Solution solution, CancellationToken cancellationToken)
287public static async Task<GraphNodeId> GetIdForMemberAsync(ISymbol member, Solution solution, CancellationToken cancellationToken)
390private static async Task<Uri> GetAssemblyFullPathAsync(ISymbol symbol, Solution solution, CancellationToken cancellationToken)
396private static async Task<Uri> GetAssemblyFullPathAsync(IAssemblySymbol containingAssembly, Solution solution, CancellationToken cancellationToken)
444internal static async Task<GraphNodeId> GetIdForAssemblyAsync(IAssemblySymbol assemblySymbol, Solution solution, CancellationToken cancellationToken)
457internal static async Task<GraphNodeId> GetIdForParameterAsync(IParameterSymbol symbol, Solution solution, CancellationToken cancellationToken)
485internal static async Task<GraphNodeId> GetIdForLocalVariableAsync(ISymbol symbol, Solution solution, CancellationToken cancellationToken)
515private static async Task<int> GetLocalVariableIndexAsync(ISymbol symbol, Solution solution, CancellationToken cancellationToken)
TaskList\ExternalErrorDiagnosticUpdateSource.cs (10)
198var solution = state.Solution;
217async ValueTask ClearErrorsCoreAsync(ProjectId projectId, Solution solution, InProgressState? state)
352var solution = inProgressState.Solution;
380private void ReportBuildErrors<T>(T item, Solution solution, ImmutableArray<DiagnosticData> buildErrors)
393private void ClearBuildOnlyProjectErrors(Solution solution, ProjectId? projectId)
411private void ClearBuildOnlyDocumentErrors(Solution solution, ProjectId? projectId, DocumentId? documentId)
539private void RaiseDiagnosticsCreated(object? id, Solution solution, ProjectId? projectId, DocumentId? documentId, ImmutableArray<DiagnosticData> items)
546private void RaiseDiagnosticsRemoved(object? id, Solution solution, ProjectId? projectId, DocumentId? documentId)
645public InProgressState(ExternalErrorDiagnosticUpdateSource owner, Solution solution, CancellationToken cancellationToken)
652public Solution Solution { get; }