Skip to content

Commit 44cf1a5

Browse files
committed
Revert dotnet#80815 and bring those changes here
1 parent 0b8ccb4 commit 44cf1a5

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

src/Tools/ExternalAccess/Razor/Features/Cohost/Handlers/SemanticTokensRange.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,6 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.Razor.Cohost.Handlers
1313
{
1414
internal static class SemanticTokensRange
1515
{
16-
public static void RegisterRefresh(RazorCohostRequestContext requestContext)
17-
{
18-
var refreshQueue = requestContext.GetRequiredService<SemanticTokensRefreshQueue>();
19-
refreshQueue.AllowRazorRefresh = true;
20-
}
21-
22-
public static Task TryEnqueueRefreshComputationAsync(RazorCohostRequestContext requestContext, Project project, CancellationToken cancellationToken)
23-
{
24-
var refreshQueue = requestContext.GetRequiredService<SemanticTokensRefreshQueue>();
25-
return refreshQueue.TryEnqueueRefreshComputationAsync(project, cancellationToken);
26-
}
27-
2816
public static Task<int[]> GetSemanticTokensAsync(
2917
Document document,
3018
ImmutableArray<LinePositionSpan> spans,

src/Tools/ExternalAccess/Razor/Features/Cohost/RazorSemanticTokensRefreshQueueWrapper.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public void Initialize(string clientCapabilitiesString)
3636
// Initialize method in the queue itself is resilient to being called twice, so it doesn't actually do
3737
// any harm.
3838
semanticTokensRefreshQueue.Initialize(clientCapabilities);
39+
semanticTokensRefreshQueue.AllowRazorRefresh = true;
3940
}
4041

4142
public Task TryEnqueueRefreshComputationAsync(Project project, CancellationToken cancellationToken)

0 commit comments

Comments
 (0)