Skip to content

Commit 0d68401

Browse files
authored
Followups to previous PR that need EA changes (#11949)
Razor side of dotnet/roslyn#78949 Two followups from previous PRs: * Export formatting options for Razor testing: #11911 (comment) * Share const for complex edit command name: #11938 (comment) Won't build, of course, without the above PR merged and packages referenced
2 parents 5025403 + 7488954 commit 0d68401

File tree

160 files changed

+651
-584
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+651
-584
lines changed

Directory.Packages.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
<PackageVersion Include="Microsoft.CodeAnalysis.EditorFeatures" Version="$(MicrosoftCodeAnalysisEditorFeaturesPackageVersion)" />
4343
<PackageVersion Include="Microsoft.CodeAnalysis.EditorFeatures.Common" Version="$(MicrosoftCodeAnalysisEditorFeaturesCommonPackageVersion)" />
4444
<PackageVersion Include="Microsoft.CodeAnalysis.EditorFeatures.Text" Version="$(MicrosoftCodeAnalysisEditorFeaturesTextPackageVersion)" />
45-
<PackageVersion Include="Microsoft.CodeAnalysis.EditorFeatures.Wpf" Version="$(MicrosoftCodeAnalysisEditorFeaturesWpfPackageVersion)" />
4645
<PackageVersion Include="Microsoft.CodeAnalysis.ExternalAccess.FSharp" Version="$(MicrosoftCodeAnalysisExternalAccessFSharpVersion)" />
4746
<PackageVersion Include="Microsoft.CodeAnalysis.ExternalAccess.Razor.EditorFeatures" Version="$(MicrosoftCodeAnalysisExternalAccessRazorEditorFeaturesPackageVersion)" />
4847
<PackageVersion Include="Microsoft.CodeAnalysis.ExternalAccess.Razor.Features" Version="$(MicrosoftCodeAnalysisExternalAccessRazorFeaturesPackageVersion)" />

eng/Version.Details.xml

Lines changed: 40 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,89 +2,85 @@
22
<Dependencies>
33
<Source Uri="https://github.com/dotnet/dotnet" Mapping="razor" Sha="f5705c8f4c5079bba77bae8698ba1583bde0388c" BarId="269610" />
44
<ProductDependencies>
5-
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="5.0.0-1.25230.6">
5+
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="5.0.0-1.25316.1">
66
<Uri>https://github.com/dotnet/roslyn</Uri>
7-
<Sha>ded867328249b5a9b9e6e29e3f07abc19111f5d1</Sha>
7+
<Sha>e15bc0a7eb664d20e7237daef7ab6b76da6c16cb</Sha>
88
</Dependency>
9-
<Dependency Name="Microsoft.CommonLanguageServerProtocol.Framework" Version="5.0.0-1.25230.6">
9+
<Dependency Name="Microsoft.CommonLanguageServerProtocol.Framework" Version="5.0.0-1.25316.1">
1010
<Uri>https://github.com/dotnet/roslyn</Uri>
11-
<Sha>ded867328249b5a9b9e6e29e3f07abc19111f5d1</Sha>
11+
<Sha>e15bc0a7eb664d20e7237daef7ab6b76da6c16cb</Sha>
1212
</Dependency>
13-
<Dependency Name="Microsoft.CodeAnalysis.Common" Version="5.0.0-1.25230.6">
13+
<Dependency Name="Microsoft.CodeAnalysis.Common" Version="5.0.0-1.25316.1">
1414
<Uri>https://github.com/dotnet/roslyn</Uri>
15-
<Sha>ded867328249b5a9b9e6e29e3f07abc19111f5d1</Sha>
15+
<Sha>e15bc0a7eb664d20e7237daef7ab6b76da6c16cb</Sha>
1616
</Dependency>
17-
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="5.0.0-1.25230.6">
17+
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="5.0.0-1.25316.1">
1818
<Uri>https://github.com/dotnet/roslyn</Uri>
19-
<Sha>ded867328249b5a9b9e6e29e3f07abc19111f5d1</Sha>
19+
<Sha>e15bc0a7eb664d20e7237daef7ab6b76da6c16cb</Sha>
2020
</Dependency>
21-
<Dependency Name="Microsoft.CodeAnalysis.CSharp.EditorFeatures" Version="5.0.0-1.25230.6">
21+
<Dependency Name="Microsoft.CodeAnalysis.CSharp.EditorFeatures" Version="5.0.0-1.25316.1">
2222
<Uri>https://github.com/dotnet/roslyn</Uri>
23-
<Sha>ded867328249b5a9b9e6e29e3f07abc19111f5d1</Sha>
23+
<Sha>e15bc0a7eb664d20e7237daef7ab6b76da6c16cb</Sha>
2424
</Dependency>
25-
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Features" Version="5.0.0-1.25230.6">
25+
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Features" Version="5.0.0-1.25316.1">
2626
<Uri>https://github.com/dotnet/roslyn</Uri>
27-
<Sha>ded867328249b5a9b9e6e29e3f07abc19111f5d1</Sha>
27+
<Sha>e15bc0a7eb664d20e7237daef7ab6b76da6c16cb</Sha>
2828
</Dependency>
29-
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="5.0.0-1.25230.6">
29+
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="5.0.0-1.25316.1">
3030
<Uri>https://github.com/dotnet/roslyn</Uri>
31-
<Sha>ded867328249b5a9b9e6e29e3f07abc19111f5d1</Sha>
31+
<Sha>e15bc0a7eb664d20e7237daef7ab6b76da6c16cb</Sha>
3232
</Dependency>
33-
<Dependency Name="Microsoft.CodeAnalysis.EditorFeatures" Version="5.0.0-1.25230.6">
33+
<Dependency Name="Microsoft.CodeAnalysis.EditorFeatures" Version="5.0.0-1.25316.1">
3434
<Uri>https://github.com/dotnet/roslyn</Uri>
35-
<Sha>ded867328249b5a9b9e6e29e3f07abc19111f5d1</Sha>
35+
<Sha>e15bc0a7eb664d20e7237daef7ab6b76da6c16cb</Sha>
3636
</Dependency>
37-
<Dependency Name="Microsoft.CodeAnalysis.EditorFeatures.Common" Version="5.0.0-1.25230.6">
37+
<Dependency Name="Microsoft.CodeAnalysis.EditorFeatures.Common" Version="5.0.0-1.25316.1">
3838
<Uri>https://github.com/dotnet/roslyn</Uri>
39-
<Sha>ded867328249b5a9b9e6e29e3f07abc19111f5d1</Sha>
39+
<Sha>e15bc0a7eb664d20e7237daef7ab6b76da6c16cb</Sha>
4040
</Dependency>
41-
<Dependency Name="Microsoft.CodeAnalysis.EditorFeatures.Text" Version="5.0.0-1.25230.6">
41+
<Dependency Name="Microsoft.CodeAnalysis.EditorFeatures.Text" Version="5.0.0-1.25316.1">
4242
<Uri>https://github.com/dotnet/roslyn</Uri>
43-
<Sha>ded867328249b5a9b9e6e29e3f07abc19111f5d1</Sha>
43+
<Sha>e15bc0a7eb664d20e7237daef7ab6b76da6c16cb</Sha>
4444
</Dependency>
45-
<Dependency Name="Microsoft.CodeAnalysis.EditorFeatures.Wpf" Version="5.0.0-1.25230.6">
45+
<Dependency Name="Microsoft.CodeAnalysis.Remote.ServiceHub" Version="5.0.0-1.25316.1">
4646
<Uri>https://github.com/dotnet/roslyn</Uri>
47-
<Sha>ded867328249b5a9b9e6e29e3f07abc19111f5d1</Sha>
47+
<Sha>e15bc0a7eb664d20e7237daef7ab6b76da6c16cb</Sha>
4848
</Dependency>
49-
<Dependency Name="Microsoft.CodeAnalysis.Remote.ServiceHub" Version="5.0.0-1.25230.6">
49+
<Dependency Name="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="5.0.0-1.25316.1">
5050
<Uri>https://github.com/dotnet/roslyn</Uri>
51-
<Sha>ded867328249b5a9b9e6e29e3f07abc19111f5d1</Sha>
51+
<Sha>e15bc0a7eb664d20e7237daef7ab6b76da6c16cb</Sha>
5252
</Dependency>
53-
<Dependency Name="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="5.0.0-1.25230.6">
53+
<Dependency Name="Microsoft.CodeAnalysis.Workspaces.Common" Version="5.0.0-1.25316.1">
5454
<Uri>https://github.com/dotnet/roslyn</Uri>
55-
<Sha>ded867328249b5a9b9e6e29e3f07abc19111f5d1</Sha>
55+
<Sha>e15bc0a7eb664d20e7237daef7ab6b76da6c16cb</Sha>
5656
</Dependency>
57-
<Dependency Name="Microsoft.CodeAnalysis.Workspaces.Common" Version="5.0.0-1.25230.6">
57+
<Dependency Name="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="5.0.0-1.25316.1">
5858
<Uri>https://github.com/dotnet/roslyn</Uri>
59-
<Sha>ded867328249b5a9b9e6e29e3f07abc19111f5d1</Sha>
59+
<Sha>e15bc0a7eb664d20e7237daef7ab6b76da6c16cb</Sha>
6060
</Dependency>
61-
<Dependency Name="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="5.0.0-1.25230.6">
61+
<Dependency Name="Microsoft.VisualStudio.LanguageServices" Version="5.0.0-1.25316.1">
6262
<Uri>https://github.com/dotnet/roslyn</Uri>
63-
<Sha>ded867328249b5a9b9e6e29e3f07abc19111f5d1</Sha>
63+
<Sha>e15bc0a7eb664d20e7237daef7ab6b76da6c16cb</Sha>
6464
</Dependency>
65-
<Dependency Name="Microsoft.VisualStudio.LanguageServices" Version="5.0.0-1.25230.6">
65+
<Dependency Name="Microsoft.CodeAnalysis.Test.Utilities" Version="5.0.0-1.25316.1">
6666
<Uri>https://github.com/dotnet/roslyn</Uri>
67-
<Sha>ded867328249b5a9b9e6e29e3f07abc19111f5d1</Sha>
67+
<Sha>e15bc0a7eb664d20e7237daef7ab6b76da6c16cb</Sha>
6868
</Dependency>
69-
<Dependency Name="Microsoft.CodeAnalysis.Test.Utilities" Version="5.0.0-1.25230.6">
69+
<Dependency Name="Microsoft.CodeAnalysis.ExternalAccess.Razor.Features" Version="5.0.0-1.25316.1">
7070
<Uri>https://github.com/dotnet/roslyn</Uri>
71-
<Sha>ded867328249b5a9b9e6e29e3f07abc19111f5d1</Sha>
71+
<Sha>e15bc0a7eb664d20e7237daef7ab6b76da6c16cb</Sha>
7272
</Dependency>
73-
<Dependency Name="Microsoft.CodeAnalysis.ExternalAccess.Razor.Features" Version="5.0.0-1.25230.6">
73+
<Dependency Name="Microsoft.CodeAnalysis.ExternalAccess.Razor.EditorFeatures" Version="5.0.0-1.25316.1">
7474
<Uri>https://github.com/dotnet/roslyn</Uri>
75-
<Sha>ded867328249b5a9b9e6e29e3f07abc19111f5d1</Sha>
75+
<Sha>e15bc0a7eb664d20e7237daef7ab6b76da6c16cb</Sha>
7676
</Dependency>
77-
<Dependency Name="Microsoft.CodeAnalysis.ExternalAccess.Razor.EditorFeatures" Version="5.0.0-1.25230.6">
77+
<Dependency Name="Microsoft.CodeAnalysis.LanguageServer.Protocol" Version="5.0.0-1.25316.1">
7878
<Uri>https://github.com/dotnet/roslyn</Uri>
79-
<Sha>ded867328249b5a9b9e6e29e3f07abc19111f5d1</Sha>
79+
<Sha>e15bc0a7eb664d20e7237daef7ab6b76da6c16cb</Sha>
8080
</Dependency>
81-
<Dependency Name="Microsoft.CodeAnalysis.LanguageServer.Protocol" Version="5.0.0-1.25230.6">
81+
<Dependency Name="Microsoft.CodeAnalysis.ExternalAccess.FSharp" Version="5.0.0-1.25316.1">
8282
<Uri>https://github.com/dotnet/roslyn</Uri>
83-
<Sha>ded867328249b5a9b9e6e29e3f07abc19111f5d1</Sha>
84-
</Dependency>
85-
<Dependency Name="Microsoft.CodeAnalysis.ExternalAccess.FSharp" Version="5.0.0-1.25230.6">
86-
<Uri>https://github.com/dotnet/roslyn</Uri>
87-
<Sha>ded867328249b5a9b9e6e29e3f07abc19111f5d1</Sha>
83+
<Sha>e15bc0a7eb664d20e7237daef7ab6b76da6c16cb</Sha>
8884
</Dependency>
8985
<Dependency Name="Microsoft.CodeAnalysis.Analyzers" Version="3.12.0-beta1.25230.6">
9086
<Uri>https://github.com/dotnet/roslyn</Uri>

eng/Versions.props

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -48,27 +48,26 @@
4848
-->
4949
<PropertyGroup Label="Automated">
5050
<MicrosoftCodeAnalysisAnalyzersPackageVersion>3.12.0-beta1.25230.6</MicrosoftCodeAnalysisAnalyzersPackageVersion>
51-
<MicrosoftNetCompilersToolsetPackageVersion>5.0.0-1.25230.6</MicrosoftNetCompilersToolsetPackageVersion>
52-
<MicrosoftCodeAnalysisExternalAccessFSharpPackageVersion>5.0.0-1.25230.6</MicrosoftCodeAnalysisExternalAccessFSharpPackageVersion>
53-
<MicrosoftCommonLanguageServerProtocolFrameworkPackageVersion>5.0.0-1.25230.6</MicrosoftCommonLanguageServerProtocolFrameworkPackageVersion>
54-
<MicrosoftCodeAnalysisExternalAccessRazorEditorFeaturesPackageVersion>5.0.0-1.25230.6</MicrosoftCodeAnalysisExternalAccessRazorEditorFeaturesPackageVersion>
55-
<MicrosoftCodeAnalysisExternalAccessRazorFeaturesPackageVersion>5.0.0-1.25230.6</MicrosoftCodeAnalysisExternalAccessRazorFeaturesPackageVersion>
56-
<MicrosoftCodeAnalysisCommonPackageVersion>5.0.0-1.25230.6</MicrosoftCodeAnalysisCommonPackageVersion>
57-
<MicrosoftCodeAnalysisCSharpPackageVersion>5.0.0-1.25230.6</MicrosoftCodeAnalysisCSharpPackageVersion>
58-
<MicrosoftCodeAnalysisCSharpEditorFeaturesPackageVersion>5.0.0-1.25230.6</MicrosoftCodeAnalysisCSharpEditorFeaturesPackageVersion>
59-
<MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>5.0.0-1.25230.6</MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>
60-
<MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>5.0.0-1.25230.6</MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>
61-
<MicrosoftCodeAnalysisEditorFeaturesPackageVersion>5.0.0-1.25230.6</MicrosoftCodeAnalysisEditorFeaturesPackageVersion>
62-
<MicrosoftCodeAnalysisEditorFeaturesCommonPackageVersion>5.0.0-1.25230.6</MicrosoftCodeAnalysisEditorFeaturesCommonPackageVersion>
63-
<MicrosoftCodeAnalysisEditorFeaturesTextPackageVersion>5.0.0-1.25230.6</MicrosoftCodeAnalysisEditorFeaturesTextPackageVersion>
64-
<MicrosoftCodeAnalysisEditorFeaturesWpfPackageVersion>5.0.0-1.25230.6</MicrosoftCodeAnalysisEditorFeaturesWpfPackageVersion>
65-
<MicrosoftCodeAnalysisLanguageServerProtocolPackageVersion>5.0.0-1.25230.6</MicrosoftCodeAnalysisLanguageServerProtocolPackageVersion>
66-
<MicrosoftCodeAnalysisRemoteServiceHubPackageVersion>5.0.0-1.25230.6</MicrosoftCodeAnalysisRemoteServiceHubPackageVersion>
67-
<MicrosoftCodeAnalysisTestUtilitiesPackageVersion>5.0.0-1.25230.6</MicrosoftCodeAnalysisTestUtilitiesPackageVersion>
68-
<MicrosoftCodeAnalysisVisualBasicWorkspacesPackageVersion>5.0.0-1.25230.6</MicrosoftCodeAnalysisVisualBasicWorkspacesPackageVersion>
69-
<MicrosoftCodeAnalysisWorkspacesCommonPackageVersion>5.0.0-1.25230.6</MicrosoftCodeAnalysisWorkspacesCommonPackageVersion>
70-
<MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>5.0.0-1.25230.6</MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>
71-
<MicrosoftVisualStudioLanguageServicesPackageVersion>5.0.0-1.25230.6</MicrosoftVisualStudioLanguageServicesPackageVersion>
51+
<MicrosoftNetCompilersToolsetPackageVersion>5.0.0-1.25316.1</MicrosoftNetCompilersToolsetPackageVersion>
52+
<MicrosoftCodeAnalysisExternalAccessFSharpPackageVersion>5.0.0-1.25316.1</MicrosoftCodeAnalysisExternalAccessFSharpPackageVersion>
53+
<MicrosoftCommonLanguageServerProtocolFrameworkPackageVersion>5.0.0-1.25316.1</MicrosoftCommonLanguageServerProtocolFrameworkPackageVersion>
54+
<MicrosoftCodeAnalysisExternalAccessRazorEditorFeaturesPackageVersion>5.0.0-1.25316.1</MicrosoftCodeAnalysisExternalAccessRazorEditorFeaturesPackageVersion>
55+
<MicrosoftCodeAnalysisExternalAccessRazorFeaturesPackageVersion>5.0.0-1.25316.1</MicrosoftCodeAnalysisExternalAccessRazorFeaturesPackageVersion>
56+
<MicrosoftCodeAnalysisCommonPackageVersion>5.0.0-1.25316.1</MicrosoftCodeAnalysisCommonPackageVersion>
57+
<MicrosoftCodeAnalysisCSharpPackageVersion>5.0.0-1.25316.1</MicrosoftCodeAnalysisCSharpPackageVersion>
58+
<MicrosoftCodeAnalysisCSharpEditorFeaturesPackageVersion>5.0.0-1.25316.1</MicrosoftCodeAnalysisCSharpEditorFeaturesPackageVersion>
59+
<MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>5.0.0-1.25316.1</MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>
60+
<MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>5.0.0-1.25316.1</MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>
61+
<MicrosoftCodeAnalysisEditorFeaturesPackageVersion>5.0.0-1.25316.1</MicrosoftCodeAnalysisEditorFeaturesPackageVersion>
62+
<MicrosoftCodeAnalysisEditorFeaturesCommonPackageVersion>5.0.0-1.25316.1</MicrosoftCodeAnalysisEditorFeaturesCommonPackageVersion>
63+
<MicrosoftCodeAnalysisEditorFeaturesTextPackageVersion>5.0.0-1.25316.1</MicrosoftCodeAnalysisEditorFeaturesTextPackageVersion>
64+
<MicrosoftCodeAnalysisLanguageServerProtocolPackageVersion>5.0.0-1.25316.1</MicrosoftCodeAnalysisLanguageServerProtocolPackageVersion>
65+
<MicrosoftCodeAnalysisRemoteServiceHubPackageVersion>5.0.0-1.25316.1</MicrosoftCodeAnalysisRemoteServiceHubPackageVersion>
66+
<MicrosoftCodeAnalysisTestUtilitiesPackageVersion>5.0.0-1.25316.1</MicrosoftCodeAnalysisTestUtilitiesPackageVersion>
67+
<MicrosoftCodeAnalysisVisualBasicWorkspacesPackageVersion>5.0.0-1.25316.1</MicrosoftCodeAnalysisVisualBasicWorkspacesPackageVersion>
68+
<MicrosoftCodeAnalysisWorkspacesCommonPackageVersion>5.0.0-1.25316.1</MicrosoftCodeAnalysisWorkspacesCommonPackageVersion>
69+
<MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>5.0.0-1.25316.1</MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>
70+
<MicrosoftVisualStudioLanguageServicesPackageVersion>5.0.0-1.25316.1</MicrosoftVisualStudioLanguageServicesPackageVersion>
7271
<!--
7372
Exception - Microsoft.Extensions.ObjectPool and System.Collections.Immutable packages are not updated by automation,
7473
but are present in Version.Details.xml for source-build PVP flow. See the comment in Version.Details.xml for more information.

src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorCodeActionsBenchmark.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public async Task RazorLightbulbAsync()
131131
Context = new VSInternalCodeActionContext(),
132132
TextDocument = new VSTextDocumentIdentifier
133133
{
134-
Uri = DocumentUri!
134+
DocumentUri = new(DocumentUri!)
135135
},
136136
};
137137

src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorCompletionBenchmark.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public async Task RazorCompletionAsync()
134134
Context = new VSInternalCompletionContext { },
135135
TextDocument = new TextDocumentIdentifier
136136
{
137-
Uri = DocumentUri!,
137+
DocumentUri = new(DocumentUri!),
138138
},
139139
};
140140

src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorDiagnosticsBenchmark.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public void Setup()
5252
var uri = new Uri(razorFilePath);
5353
Request = new VSInternalDocumentDiagnosticsParams
5454
{
55-
TextDocument = new TextDocumentIdentifier { Uri = uri }
55+
TextDocument = new TextDocumentIdentifier { DocumentUri = new(uri) }
5656
};
5757
var sourceDocument = RazorSourceDocument.Create(GetFileContents(), UTF8Encoding.UTF8, RazorSourceDocumentProperties.Default);
5858
var codeDocument = RazorCodeDocument.Create(sourceDocument, RazorParserOptions.Default, RazorCodeGenerationOptions.DesignTimeDefault);

src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensRangeEndpointBenchmark.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public async Task InitializeRazorSemanticAsync()
103103
[Benchmark(Description = "Razor Semantic Tokens Range Endpoint")]
104104
public async Task RazorSemanticTokensRangeEndpointRangesAsync()
105105
{
106-
var textDocumentIdentifier = new TextDocumentIdentifier { Uri = DocumentUri };
106+
var textDocumentIdentifier = new TextDocumentIdentifier { DocumentUri = new(DocumentUri) };
107107
var request = new SemanticTokensRangeParams { Range = Range, TextDocument = textDocumentIdentifier };
108108

109109
await SemanticTokensRangeEndpoint.HandleRequestAsync(request, RequestContext, CancellationToken);

src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CapabilitiesManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ private async Task<string> ComputeRootPathAsync()
8080

8181
if (initializeParams.WorkspaceFolders is [var firstFolder, ..])
8282
{
83-
return firstFolder.Uri.GetAbsoluteOrUNCPath();
83+
return firstFolder.DocumentUri.GetAbsoluteOrUNCPath();
8484
}
8585

8686
// WorkspaceFolders was added in LSP3.6, fall back to RootUri
8787

8888
#pragma warning disable CS0618 // Type or member is obsolete
89-
if (initializeParams.RootUri is Uri rootUri)
89+
if (initializeParams.RootDocumentUri is DocumentUri rootUri)
9090
{
9191
return rootUri.GetAbsoluteOrUNCPath();
9292
}

src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/RoslynCodeActionHelpers.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ public async Task<string> GetFormattedNewFileContentsAsync(IProjectSnapshot proj
2727
{
2828
Project = new TextDocumentIdentifier
2929
{
30-
Uri = new Uri(projectSnapshot.FilePath, UriKind.Absolute)
30+
DocumentUri = new(new Uri(projectSnapshot.FilePath, UriKind.Absolute))
3131
},
3232
Document = new TextDocumentIdentifier
3333
{
34-
Uri = csharpFileUri
34+
DocumentUri = new(csharpFileUri)
3535
},
3636
Contents = newFileContent
3737
};
@@ -55,7 +55,7 @@ public async Task<string> GetFormattedNewFileContentsAsync(IProjectSnapshot proj
5555
{
5656
var tdi = codeBehindUri is null
5757
? documentContext.GetTextDocumentIdentifierAndVersion()
58-
: new TextDocumentIdentifierAndVersion(new TextDocumentIdentifier() { Uri = codeBehindUri }, 1);
58+
: new TextDocumentIdentifierAndVersion(new TextDocumentIdentifier() { DocumentUri = new(codeBehindUri) }, 1);
5959
var delegatedParams = new DelegatedSimplifyMethodParams(
6060
tdi,
6161
RequiresVirtualDocument: codeBehindUri == null,

0 commit comments

Comments
 (0)