17 instantiations of InvocationReasons
Microsoft.CodeAnalysis.Workspaces (17)
ExternalAccess\UnitTesting\Api\UnitTestingInvocationReasonsWrapper.cs (1)
34
: this(new
InvocationReasons
(reason)) { }
SolutionCrawler\InvocationReasons.cs (3)
15
public static readonly InvocationReasons Empty =
new
(ImmutableHashSet<string>.Empty);
34
=>
new
(_reasons.Union(invocationReasons._reasons));
37
=>
new
(_reasons.Add(reason));
SolutionCrawler\InvocationReasons_Constants.cs (13)
14
new
(
21
new
(
29
new
(
36
new
(
43
new
(
49
new
(
55
new
(
61
new
(
67
new
(
73
new
(
78
new
(
83
new
(PredefinedInvocationReasons.Reanalyze);
89
new
(PredefinedInvocationReasons.ActiveDocumentSwitched);
148 references to InvocationReasons
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (33)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (19)
511
await incrementalAnalyzer.AnalyzeProjectAsync(project, semanticsChanged: true,
InvocationReasons
.Reanalyze, CancellationToken.None);
617
await incrementalAnalyzer.AnalyzeProjectAsync(project, semanticsChanged: true,
InvocationReasons
.Reanalyze, CancellationToken.None);
674
await incrementalAnalyzer.AnalyzeNonSourceDocumentAsync(firstAdditionalDocument,
InvocationReasons
.SyntaxChanged, CancellationToken.None);
678
await incrementalAnalyzer.AnalyzeProjectAsync(project, semanticsChanged: true,
InvocationReasons
.Reanalyze, CancellationToken.None);
786
await incrementalAnalyzer.AnalyzeDocumentAsync(document, bodyOpt: null,
InvocationReasons
.SemanticChanged, CancellationToken.None);
791
await incrementalAnalyzer.AnalyzeDocumentAsync(document, bodyOpt: null,
InvocationReasons
.SemanticChanged, CancellationToken.None);
795
await incrementalAnalyzer.AnalyzeProjectAsync(project, semanticsChanged: true,
InvocationReasons
.Reanalyze, CancellationToken.None);
921
await incrementalAnalyzer.AnalyzeDocumentAsync(document, bodyOpt: null,
InvocationReasons
.SemanticChanged, CancellationToken.None);
930
await incrementalAnalyzer.AnalyzeDocumentAsync(document, bodyOpt: null,
InvocationReasons
.SemanticChanged, CancellationToken.None);
934
await incrementalAnalyzer.AnalyzeProjectAsync(project, semanticsChanged: true,
InvocationReasons
.Reanalyze, CancellationToken.None);
1019
await incrementalAnalyzer.AnalyzeSyntaxAsync(document,
InvocationReasons
.SyntaxChanged, analyzer.CancellationToken);
1023
await incrementalAnalyzer.AnalyzeDocumentAsync(document, bodyOpt: null,
InvocationReasons
.SemanticChanged, analyzer.CancellationToken);
1038
await incrementalAnalyzer.AnalyzeSyntaxAsync(document,
InvocationReasons
.SyntaxChanged, CancellationToken.None);
1042
await incrementalAnalyzer.AnalyzeDocumentAsync(document, bodyOpt: null,
InvocationReasons
.SemanticChanged, CancellationToken.None);
1182
await incrementalAnalyzer.AnalyzeProjectAsync(project, semanticsChanged: true,
InvocationReasons
.Reanalyze, CancellationToken.None);
1232
await analyzer.AnalyzeSyntaxAsync(document,
InvocationReasons
.Empty, CancellationToken.None).ConfigureAwait(false);
1233
await analyzer.AnalyzeDocumentAsync(document, bodyOpt: null, reasons:
InvocationReasons
.Empty, cancellationToken: CancellationToken.None).ConfigureAwait(false);
1237
await analyzer.AnalyzeNonSourceDocumentAsync(textDocument,
InvocationReasons
.Empty, CancellationToken.None).ConfigureAwait(false);
1240
await analyzer.AnalyzeProjectAsync(textDocument.Project, semanticsChanged: true, reasons:
InvocationReasons
.Empty, cancellationToken: CancellationToken.None).ConfigureAwait(false);
SolutionCrawler\WorkCoordinatorTests.cs (14)
1324
var item = new WorkItem(documentId, "C#",
InvocationReasons
.DocumentAdded, isLowPriority: false, analyzer: null, EmptyAsyncToken.Instance);
1345
var item = new WorkItem(documentId, "C#",
InvocationReasons
.DocumentAdded, isLowPriority: false, analyzer: analyzer, EmptyAsyncToken.Instance);
1366
var item = new WorkItem(documentId, "C#",
InvocationReasons
.DocumentAdded, isLowPriority: false, analyzer: analyzer, EmptyAsyncToken.Instance);
1866
public Task AnalyzeProjectAsync(Project project, bool semanticsChanged,
InvocationReasons
reasons, CancellationToken cancellationToken)
1872
public Task AnalyzeDocumentAsync(Document document, SyntaxNode bodyOpt,
InvocationReasons
reasons, CancellationToken cancellationToken)
1882
public Task AnalyzeSyntaxAsync(Document document,
InvocationReasons
reasons, CancellationToken cancellationToken)
1889
public Task AnalyzeNonSourceDocumentAsync(TextDocument textDocument,
InvocationReasons
reasons, CancellationToken cancellationToken)
1904
await AnalyzeSyntaxAsync(sourceDocument,
InvocationReasons
.ActiveDocumentSwitched, cancellationToken).ConfigureAwait(false);
1905
await AnalyzeDocumentAsync(sourceDocument, bodyOpt: null,
InvocationReasons
.ActiveDocumentSwitched, cancellationToken).ConfigureAwait(false);
1909
await AnalyzeNonSourceDocumentAsync(document,
InvocationReasons
.ActiveDocumentSwitched, cancellationToken).ConfigureAwait(false);
1991
public Task AnalyzeDocumentAsync(Document document, SyntaxNode bodyOpt,
InvocationReasons
reasons, CancellationToken cancellationToken)
2003
public Task AnalyzeSyntaxAsync(Document document,
InvocationReasons
reasons, CancellationToken cancellationToken) => Task.CompletedTask;
2004
public Task AnalyzeProjectAsync(Project project, bool semanticsChanged,
InvocationReasons
reasons, CancellationToken cancellationToken) => Task.CompletedTask;
2010
public Task AnalyzeNonSourceDocumentAsync(TextDocument textDocument,
InvocationReasons
reasons, CancellationToken cancellationToken) => Task.CompletedTask;
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Diagnostics\DiagnosticServiceTests.vb (1)
2175
incrementalAnalyzer.AnalyzeProjectAsync(project, semanticsChanged:=True, reasons:=
InvocationReasons
.Empty, cancellationToken:=CancellationToken.None).Wait()
Microsoft.CodeAnalysis.Features (57)
SolutionCrawler\AbstractDocumentDifferenceService.cs (7)
26
return new DocumentDifferenceResult(
InvocationReasons
.DocumentChanged);
34
return new DocumentDifferenceResult(
InvocationReasons
.DocumentChanged);
61
return new DocumentDifferenceResult(
InvocationReasons
.DocumentChanged);
84
return new DocumentDifferenceResult(
InvocationReasons
.SyntaxChanged, GetChangedMember(syntaxFactsService, oldRoot, newRoot, range));
87
return new DocumentDifferenceResult(
InvocationReasons
.DocumentChanged, GetBestGuessChangedMember(syntaxFactsService, oldRoot, newRoot, range));
92
return new DocumentDifferenceResult(
InvocationReasons
.SyntaxChanged);
95
return new DocumentDifferenceResult(
InvocationReasons
.DocumentChanged);
SolutionCrawler\IDocumentDifferenceService.cs (2)
13
public
InvocationReasons
ChangeType { get; }
16
public DocumentDifferenceResult(
InvocationReasons
changeType, SyntaxNode? changedMember = null)
SolutionCrawler\IncrementalAnalyzerBase.cs (4)
32
public virtual Task AnalyzeSyntaxAsync(Document document,
InvocationReasons
reasons, CancellationToken cancellationToken)
35
public virtual Task AnalyzeDocumentAsync(Document document, SyntaxNode bodyOpt,
InvocationReasons
reasons, CancellationToken cancellationToken)
38
public virtual Task AnalyzeProjectAsync(Project project, bool semanticsChanged,
InvocationReasons
reasons, CancellationToken cancellationToken)
56
public virtual Task AnalyzeNonSourceDocumentAsync(TextDocument textDocument,
InvocationReasons
reasons, CancellationToken cancellationToken)
SolutionCrawler\SolutionCrawlerLogger.cs (1)
156
CountLogAggregator<object> logAggregator, string language, DocumentId? documentId,
InvocationReasons
reasons, bool lowPriority, SyntaxPath? activeMember, bool added)
SolutionCrawler\WorkCoordinator.cs (31)
155
EnqueueFullDocumentEvent(solution, activeDocumentId,
InvocationReasons
.ActiveDocumentSwitched, eventName: nameof(OnActiveDocumentSwitched));
201
EnqueueFullSolutionEvent(args.NewSolution,
InvocationReasons
.DocumentAdded, eventName);
206
EnqueueFullSolutionEvent(args.OldSolution,
InvocationReasons
.SolutionRemoved, eventName);
216
EnqueueFullProjectEvent(args.NewSolution, args.ProjectId,
InvocationReasons
.DocumentAdded, eventName);
221
EnqueueFullProjectEvent(args.OldSolution, args.ProjectId,
InvocationReasons
.DocumentRemoved, eventName);
232
EnqueueFullDocumentEvent(args.NewSolution, args.DocumentId,
InvocationReasons
.DocumentAdded, eventName);
237
EnqueueFullDocumentEvent(args.OldSolution, args.DocumentId,
InvocationReasons
.DocumentRemoved, eventName);
256
EnqueueFullProjectEvent(args.NewSolution, args.ProjectId,
InvocationReasons
.AdditionalDocumentChanged, eventName);
267
() => EnqueueDocumentWorkItemAsync(e.Document.Project, e.Document.Id, e.Document,
InvocationReasons
.DocumentOpened), _shutdownToken);
273
() => EnqueueDocumentWorkItemAsync(e.Document.Project, e.Document.Id, e.Document,
InvocationReasons
.DocumentClosed), _shutdownToken);
287
await EnqueueFullProjectWorkItemAsync(addedProject,
InvocationReasons
.DocumentAdded).ConfigureAwait(false);
297
await EnqueueFullProjectWorkItemAsync(removedProject,
InvocationReasons
.DocumentRemoved).ConfigureAwait(false);
303
private void EnqueueFullSolutionEvent(Solution solution,
InvocationReasons
invocationReasons, string eventName)
331
private void EnqueueFullProjectEvent(Solution solution, ProjectId projectId,
InvocationReasons
invocationReasons, string eventName)
337
private void EnqueueFullDocumentEvent(Solution solution, DocumentId documentId,
InvocationReasons
invocationReasons, string eventName)
377
EnqueueFullDocumentEvent(oldSolution, oldDocumentId,
InvocationReasons
.DocumentRemoved, "OnWorkspaceChanged");
386
EnqueueFullDocumentEvent(newSolution, newDocumentId,
InvocationReasons
.DocumentAdded, "OnWorkspaceChanged");
399
private async Task EnqueueDocumentWorkItemAsync(Project project, DocumentId documentId, TextDocument? document,
InvocationReasons
invocationReasons, SyntaxNode? changedMember = null)
439
private async Task EnqueueFullProjectWorkItemAsync(Project project,
InvocationReasons
invocationReasons)
462
var
invocationReasons = highPriority ?
InvocationReasons
.ReanalyzeHighPriority :
InvocationReasons
.Reanalyze;
469
IIncrementalAnalyzer analyzer, Project project, DocumentId documentId, Document? document,
InvocationReasons
invocationReasons)
485
await EnqueueDocumentWorkItemAsync(projectChanges.NewProject, addedDocumentId, document: null,
InvocationReasons
.DocumentAdded).ConfigureAwait(false);
494
await EnqueueDocumentWorkItemAsync(projectChanges.OldProject, removedDocumentId, document: null,
InvocationReasons
.DocumentRemoved).ConfigureAwait(false);
503
var
projectConfigurationChange =
InvocationReasons
.Empty;
507
projectConfigurationChange = projectConfigurationChange.With(
InvocationReasons
.ProjectParseOptionChanged);
526
projectConfigurationChange = projectConfigurationChange.With(
InvocationReasons
.ProjectConfigurationChanged);
543
await EnqueueDocumentWorkItemAsync(newDocument.Project, newDocument.Id, newDocument,
InvocationReasons
.DocumentChanged).ConfigureAwait(false);
577
list.Add(new WorkItem(document.Id, document.Project.Language,
InvocationReasons
.DocumentAdded, isLowPriority: false, activeMember: null, EmptyAsyncToken.Instance));
SolutionCrawler\WorkCoordinator.IncrementalAnalyzerProcessor.cs (3)
171
var
reasons = workItem.InvocationReasons;
197
static async Task AnalyzeSyntaxAsync(IIncrementalAnalyzer analyzer, TextDocument textDocument,
InvocationReasons
reasons, CancellationToken cancellationToken)
269
var
reasons = workItem.InvocationReasons;
SolutionCrawler\WorkCoordinator.LowPriorityProcessor.cs (1)
142
var
reasons = workItem.InvocationReasons;
SolutionCrawler\WorkCoordinator.NormalPriorityProcessor.cs (2)
411
var
reasons = workItem.InvocationReasons;
444
static async Task AnalyzeSyntaxAsync(IIncrementalAnalyzer analyzer, TextDocument textDocument,
InvocationReasons
reasons, CancellationToken cancellationToken)
SolutionCrawler\WorkCoordinator.SemanticChangeProcessor.cs (1)
400
new WorkItem(documentId, project.Language,
InvocationReasons
.SemanticChanged,
SolutionCrawler\WorkCoordinator.WorkItem.cs (5)
27
public readonly
InvocationReasons
InvocationReasons;
70
InvocationReasons
invocationReasons,
93
public WorkItem(DocumentId documentId, string language,
InvocationReasons
invocationReasons, bool isLowPriority, SyntaxPath? activeMember, IAsyncToken asyncToken)
98
public WorkItem(DocumentId documentId, string language,
InvocationReasons
invocationReasons, bool isLowPriority, IIncrementalAnalyzer? analyzer, IAsyncToken asyncToken)
115
InvocationReasons
invocationReasons, SyntaxPath? currentMember,
Microsoft.CodeAnalysis.LanguageServer.Protocol (8)
Features\Diagnostics\DefaultDiagnosticAnalyzerService.cs (4)
84
public Task AnalyzeSyntaxAsync(Document document,
InvocationReasons
reasons, CancellationToken cancellationToken)
87
public Task AnalyzeNonSourceDocumentAsync(TextDocument textDocument,
InvocationReasons
reasons, CancellationToken cancellationToken)
103
public async Task AnalyzeDocumentAsync(Document document, SyntaxNode bodyOpt,
InvocationReasons
reasons, CancellationToken cancellationToken)
227
public Task AnalyzeProjectAsync(Project project, bool semanticsChanged,
InvocationReasons
reasons, CancellationToken cancellationToken)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer_IncrementalAnalyzer.cs (4)
24
public Task AnalyzeSyntaxAsync(Document document,
InvocationReasons
reasons, CancellationToken cancellationToken)
27
public Task AnalyzeDocumentAsync(Document document, SyntaxNode bodyOpt,
InvocationReasons
reasons, CancellationToken cancellationToken)
30
public Task AnalyzeNonSourceDocumentAsync(TextDocument textDocument,
InvocationReasons
reasons, CancellationToken cancellationToken)
126
public async Task AnalyzeProjectAsync(Project project, bool semanticsChanged,
InvocationReasons
reasons, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.Remote.ServiceHub (2)
Host\RemoteDocumentDifferenceService.cs (2)
70
return new DocumentDifferenceResult(
InvocationReasons
.SyntaxChanged);
74
return new DocumentDifferenceResult(
InvocationReasons
.DocumentChanged);
Microsoft.CodeAnalysis.Workspaces (32)
ExternalAccess\UnitTesting\Api\UnitTestingInvocationReasonsWrapper.cs (6)
12
public static readonly UnitTestingInvocationReasonsWrapper SemanticChanged = new(
InvocationReasons
.SemanticChanged);
13
public static readonly UnitTestingInvocationReasonsWrapper Reanalyze = new(
InvocationReasons
.Reanalyze);
14
public static readonly UnitTestingInvocationReasonsWrapper ProjectConfigurationChanged = new(
InvocationReasons
.ProjectConfigurationChanged);
15
public static readonly UnitTestingInvocationReasonsWrapper SyntaxChanged = new(
InvocationReasons
.SyntaxChanged);
28
internal
InvocationReasons
UnderlyingObject { get; }
30
internal UnitTestingInvocationReasonsWrapper(
InvocationReasons
underlyingObject)
ExternalAccess\UnitTesting\UnitTestingIncrementalAnalyzer.cs (4)
22
public Task AnalyzeDocumentAsync(Document document, SyntaxNode bodyOpt,
InvocationReasons
reasons, CancellationToken cancellationToken)
25
public Task AnalyzeProjectAsync(Project project, bool semanticsChanged,
InvocationReasons
reasons, CancellationToken cancellationToken)
28
public Task AnalyzeSyntaxAsync(Document document,
InvocationReasons
reasons, CancellationToken cancellationToken)
67
public Task AnalyzeNonSourceDocumentAsync(TextDocument textDocument,
InvocationReasons
reasons, CancellationToken cancellationToken)
SolutionCrawler\IIncrementalAnalyzer.cs (4)
26
Task AnalyzeSyntaxAsync(Document document,
InvocationReasons
reasons, CancellationToken cancellationToken);
27
Task AnalyzeDocumentAsync(Document document, SyntaxNode bodyOpt,
InvocationReasons
reasons, CancellationToken cancellationToken);
28
Task AnalyzeProjectAsync(Project project, bool semanticsChanged,
InvocationReasons
reasons, CancellationToken cancellationToken);
41
Task AnalyzeNonSourceDocumentAsync(TextDocument textDocument,
InvocationReasons
reasons, CancellationToken cancellationToken);
SolutionCrawler\InvocationReasons.cs (4)
15
public static readonly
InvocationReasons
Empty = new(ImmutableHashSet<string>.Empty);
33
public
InvocationReasons
With(
InvocationReasons
invocationReasons)
36
public
InvocationReasons
With(string reason)
SolutionCrawler\InvocationReasons_Constants.cs (14)
13
public static readonly
InvocationReasons
DocumentAdded =
20
public static readonly
InvocationReasons
DocumentRemoved =
28
public static readonly
InvocationReasons
ProjectParseOptionChanged =
35
public static readonly
InvocationReasons
ProjectConfigurationChanged =
42
public static readonly
InvocationReasons
SolutionRemoved =
48
public static readonly
InvocationReasons
DocumentOpened =
54
public static readonly
InvocationReasons
DocumentClosed =
60
public static readonly
InvocationReasons
DocumentChanged =
66
public static readonly
InvocationReasons
AdditionalDocumentChanged =
72
public static readonly
InvocationReasons
SyntaxChanged =
77
public static readonly
InvocationReasons
SemanticChanged =
82
public static readonly
InvocationReasons
Reanalyze =
85
public static readonly
InvocationReasons
ReanalyzeHighPriority =
88
public static readonly
InvocationReasons
ActiveDocumentSwitched =
Microsoft.VisualStudio.LanguageServices (1)
TaskList\TaskListIncrementalAnalyzer.cs (1)
69
public override async Task AnalyzeSyntaxAsync(Document document,
InvocationReasons
reasons, CancellationToken cancellationToken)
Microsoft.VisualStudio.LanguageServices.UnitTests (13)
Diagnostics\DefaultDiagnosticUpdateSourceTests.vb (13)
60
Await analyzer.AnalyzeSyntaxAsync(workspace.CurrentSolution.Projects.First().Documents.First(),
InvocationReasons
.Empty, CancellationToken.None)
100
Await analyzer.AnalyzeSyntaxAsync(document,
InvocationReasons
.Empty, CancellationToken.None)
101
Await analyzer.AnalyzeDocumentAsync(document, Nothing,
InvocationReasons
.Empty, CancellationToken.None)
138
Await analyzer.AnalyzeSyntaxAsync(document,
InvocationReasons
.Empty, CancellationToken.None)
139
Await analyzer.AnalyzeDocumentAsync(document, Nothing,
InvocationReasons
.Empty, CancellationToken.None)
177
Await analyzer.AnalyzeSyntaxAsync(document,
InvocationReasons
.Empty, CancellationToken.None)
178
Await analyzer.AnalyzeDocumentAsync(document, Nothing,
InvocationReasons
.Empty, CancellationToken.None)
218
Await analyzer.AnalyzeSyntaxAsync(document,
InvocationReasons
.Empty, CancellationToken.None)
219
Await analyzer.AnalyzeDocumentAsync(document, Nothing,
InvocationReasons
.Empty, CancellationToken.None)
254
Await analyzer.AnalyzeSyntaxAsync(workspace.CurrentSolution.Projects.First().Documents.First(),
InvocationReasons
.Empty, CancellationToken.None)
283
Await analyzer.AnalyzeSyntaxAsync(workspace.CurrentSolution.Projects.First().Documents.First(),
InvocationReasons
.Empty, CancellationToken.None)
322
Await analyzer.AnalyzeSyntaxAsync(document,
InvocationReasons
.Empty, CancellationToken.None)
323
Await analyzer.AnalyzeDocumentAsync(document, Nothing,
InvocationReasons
.Empty, CancellationToken.None)
Roslyn.VisualStudio.Next.UnitTests (1)
Services\SolutionServiceTests.cs (1)
875
public override Task AnalyzeDocumentAsync(Document document, SyntaxNode bodyOpt,
InvocationReasons
reasons, CancellationToken cancellationToken)