From 95c37afc6eec583fa299af8836c06eb0b130908d Mon Sep 17 00:00:00 2001 From: David Wengier Date: Tue, 30 Jul 2024 11:26:21 +1000 Subject: [PATCH 01/20] Rename VsLsp files to just Lsp I'm assuming the Vs versions of these are more complete than the Roslyn ones --- ...spExtensions_LinePosition.cs => LspExtensions_LinePosition.cs} | 0 ...ions_LinePositionSpan.cs => LspExtensions_LinePositionSpan.cs} | 0 .../{VsLspExtensions_Position.cs => LspExtensions_Position.cs} | 0 .../{VsLspExtensions_Range.cs => LspExtensions_Range.cs} | 0 ...nsions_RazorSyntaxTree.cs => LspExtensions_RazorSyntaxTree.cs} | 0 ...{VsLspExtensions_SourceText.cs => LspExtensions_SourceText.cs} | 0 .../{VsLspExtensions_SumTypes.cs => LspExtensions_SumTypes.cs} | 0 ...{VsLspExtensions_SyntaxNode.cs => LspExtensions_SyntaxNode.cs} | 0 ...{VsLspExtensions_TextChange.cs => LspExtensions_TextChange.cs} | 0 ...umentIdentifier.cs => LspExtensions_TextDocumentIdentifier.cs} | 0 ...abilities.cs => LspExtensions_VSInternalClientCapabilities.cs} | 0 ...ions_VSProjectContext.cs => LspExtensions_VSProjectContext.cs} | 0 ...Extensions_WorkspaceEdit.cs => LspExtensions_WorkspaceEdit.cs} | 0 .../Extensions/{VsLspFactory.cs => LspFactory.cs} | 0 14 files changed, 0 insertions(+), 0 deletions(-) rename src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/{VsLspExtensions_LinePosition.cs => LspExtensions_LinePosition.cs} (100%) rename src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/{VsLspExtensions_LinePositionSpan.cs => LspExtensions_LinePositionSpan.cs} (100%) rename src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/{VsLspExtensions_Position.cs => LspExtensions_Position.cs} (100%) rename src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/{VsLspExtensions_Range.cs => LspExtensions_Range.cs} (100%) rename src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/{VsLspExtensions_RazorSyntaxTree.cs => LspExtensions_RazorSyntaxTree.cs} (100%) rename src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/{VsLspExtensions_SourceText.cs => LspExtensions_SourceText.cs} (100%) rename src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/{VsLspExtensions_SumTypes.cs => LspExtensions_SumTypes.cs} (100%) rename src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/{VsLspExtensions_SyntaxNode.cs => LspExtensions_SyntaxNode.cs} (100%) rename src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/{VsLspExtensions_TextChange.cs => LspExtensions_TextChange.cs} (100%) rename src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/{VsLspExtensions_TextDocumentIdentifier.cs => LspExtensions_TextDocumentIdentifier.cs} (100%) rename src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/{VsLspExtensions_VSInternalClientCapabilities.cs => LspExtensions_VSInternalClientCapabilities.cs} (100%) rename src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/{VsLspExtensions_VSProjectContext.cs => LspExtensions_VSProjectContext.cs} (100%) rename src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/{VsLspExtensions_WorkspaceEdit.cs => LspExtensions_WorkspaceEdit.cs} (100%) rename src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/{VsLspFactory.cs => LspFactory.cs} (100%) diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspExtensions_LinePosition.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePosition.cs similarity index 100% rename from src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspExtensions_LinePosition.cs rename to src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePosition.cs diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspExtensions_LinePositionSpan.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePositionSpan.cs similarity index 100% rename from src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspExtensions_LinePositionSpan.cs rename to src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePositionSpan.cs diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspExtensions_Position.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Position.cs similarity index 100% rename from src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspExtensions_Position.cs rename to src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Position.cs diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspExtensions_Range.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Range.cs similarity index 100% rename from src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspExtensions_Range.cs rename to src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Range.cs diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspExtensions_RazorSyntaxTree.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_RazorSyntaxTree.cs similarity index 100% rename from src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspExtensions_RazorSyntaxTree.cs rename to src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_RazorSyntaxTree.cs diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspExtensions_SourceText.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SourceText.cs similarity index 100% rename from src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspExtensions_SourceText.cs rename to src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SourceText.cs diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspExtensions_SumTypes.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SumTypes.cs similarity index 100% rename from src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspExtensions_SumTypes.cs rename to src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SumTypes.cs diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspExtensions_SyntaxNode.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SyntaxNode.cs similarity index 100% rename from src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspExtensions_SyntaxNode.cs rename to src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SyntaxNode.cs diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspExtensions_TextChange.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_TextChange.cs similarity index 100% rename from src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspExtensions_TextChange.cs rename to src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_TextChange.cs diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspExtensions_TextDocumentIdentifier.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_TextDocumentIdentifier.cs similarity index 100% rename from src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspExtensions_TextDocumentIdentifier.cs rename to src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_TextDocumentIdentifier.cs diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspExtensions_VSInternalClientCapabilities.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_VSInternalClientCapabilities.cs similarity index 100% rename from src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspExtensions_VSInternalClientCapabilities.cs rename to src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_VSInternalClientCapabilities.cs diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspExtensions_VSProjectContext.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_VSProjectContext.cs similarity index 100% rename from src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspExtensions_VSProjectContext.cs rename to src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_VSProjectContext.cs diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspExtensions_WorkspaceEdit.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_WorkspaceEdit.cs similarity index 100% rename from src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspExtensions_WorkspaceEdit.cs rename to src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_WorkspaceEdit.cs diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspFactory.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspFactory.cs similarity index 100% rename from src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/VsLspFactory.cs rename to src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspFactory.cs From a9ab06782e4d3a39dcff719ff1e8f2b620667e29 Mon Sep 17 00:00:00 2001 From: David Wengier Date: Tue, 30 Jul 2024 11:26:28 +1000 Subject: [PATCH 02/20] Remote RoslynLsp files --- .../RoslynLspExtensions_LinePosition.cs | 12 -- .../RoslynLspExtensions_LinePositionSpan.cs | 12 -- .../RoslynLspExtensions_Position.cs | 15 -- .../Extensions/RoslynLspExtensions_Range.cs | 15 -- .../Extensions/RoslynLspFactory.cs | 191 ------------------ 5 files changed, 245 deletions(-) delete mode 100644 src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/RoslynLspExtensions_LinePosition.cs delete mode 100644 src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/RoslynLspExtensions_LinePositionSpan.cs delete mode 100644 src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/RoslynLspExtensions_Position.cs delete mode 100644 src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/RoslynLspExtensions_Range.cs delete mode 100644 src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/RoslynLspFactory.cs diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/RoslynLspExtensions_LinePosition.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/RoslynLspExtensions_LinePosition.cs deleted file mode 100644 index 7401bd5ca1f..00000000000 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/RoslynLspExtensions_LinePosition.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the MIT license. See License.txt in the project root for license information. - -using Microsoft.CodeAnalysis.Text; - -namespace Roslyn.LanguageServer.Protocol; - -internal static partial class RoslynLspExtensions -{ - public static Position ToPosition(this LinePosition linePosition) - => RoslynLspFactory.CreatePosition(linePosition.Line, linePosition.Character); -} diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/RoslynLspExtensions_LinePositionSpan.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/RoslynLspExtensions_LinePositionSpan.cs deleted file mode 100644 index 2819933b95f..00000000000 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/RoslynLspExtensions_LinePositionSpan.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the MIT license. See License.txt in the project root for license information. - -using Microsoft.CodeAnalysis.Text; - -namespace Roslyn.LanguageServer.Protocol; - -internal static partial class RoslynLspExtensions -{ - public static Range ToRange(this LinePositionSpan linePositionSpan) - => RoslynLspFactory.CreateRange(linePositionSpan); -} diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/RoslynLspExtensions_Position.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/RoslynLspExtensions_Position.cs deleted file mode 100644 index e4cd3c1ac93..00000000000 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/RoslynLspExtensions_Position.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the MIT license. See License.txt in the project root for license information. - -using Microsoft.CodeAnalysis.Text; - -namespace Roslyn.LanguageServer.Protocol; - -internal static partial class RoslynLspExtensions -{ - public static LinePosition ToLinePosition(this Position position) - => new(position.Line, position.Character); - - public static string ToDisplayString(this Position position) - => $"({position.Line}, {position.Character})"; -} diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/RoslynLspExtensions_Range.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/RoslynLspExtensions_Range.cs deleted file mode 100644 index af7e54346c8..00000000000 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/RoslynLspExtensions_Range.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the MIT license. See License.txt in the project root for license information. - -using Microsoft.CodeAnalysis.Text; - -namespace Roslyn.LanguageServer.Protocol; - -internal static partial class RoslynLspExtensions -{ - public static LinePositionSpan ToLinePositionSpan(this Range range) - => new(range.Start.ToLinePosition(), range.End.ToLinePosition()); - - public static string ToDisplayString(this Range range) - => $"{range.Start.ToDisplayString()}-{range.End.ToDisplayString()}"; -} diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/RoslynLspFactory.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/RoslynLspFactory.cs deleted file mode 100644 index 841ea8c1ed4..00000000000 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/RoslynLspFactory.cs +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the MIT license. See License.txt in the project root for license information. - -using System.Diagnostics; -using Microsoft.CodeAnalysis.Text; - -namespace Roslyn.LanguageServer.Protocol; - -internal static class RoslynLspFactory -{ - private static readonly Position s_defaultPosition = new(0, 0); - - private static readonly Range s_defaultRange = new() - { - Start = s_defaultPosition, - End = s_defaultPosition - }; - - private static readonly Position s_undefinedPosition = new(-1, -1); - - private static readonly Range s_undefinedRange = new() - { - Start = s_undefinedPosition, - End = s_undefinedPosition - }; - - /// - /// Returns a for line 0 and character 0. - /// - public static Position DefaultPosition - { - get - { - var defaultPosition = s_defaultPosition; - - // Since Position is mutable, it's possible that something might modify it. If that happens, we should know! - Debug.Assert( - defaultPosition.Line == 0 && - defaultPosition.Character == 0, - $"{nameof(RoslynLspFactory)}.{nameof(DefaultPosition)} has been corrupted. Current value: {defaultPosition.ToDisplayString()}"); - - return defaultPosition; - } - } - - /// - /// Returns a for starting line 0 and character 0, - /// and ending line 0 and character 0. - /// - public static Range DefaultRange - { - get - { - var defaultRange = s_defaultRange; - - // Since Range is mutable, it's possible that something might modify it. If that happens, we should know! - Debug.Assert( - defaultRange.Start.Line == 0 && - defaultRange.Start.Character == 0 && - defaultRange.End.Line == 0 && - defaultRange.End.Character == 0, - $"{nameof(RoslynLspFactory)}.{nameof(DefaultRange)} has been corrupted. Current value: {defaultRange.ToDisplayString()}"); - - return defaultRange; - } - } - - public static Position UndefinedPosition - { - get - { - var undefinedPosition = s_undefinedPosition; - - // Since Position is mutable, it's possible that something might modify it. If that happens, we should know! - Debug.Assert( - undefinedPosition.Line == -1 && - undefinedPosition.Character == -1, - $"{nameof(RoslynLspFactory)}.{nameof(UndefinedPosition)} has been corrupted. Current value: {undefinedPosition.ToDisplayString()}"); - - return undefinedPosition; - } - } - - public static Range UndefinedRange - { - get - { - var undefinedRange = s_undefinedRange; - - // Since Range is mutable, it's possible that something might modify it. If that happens, we should know! - Debug.Assert( - undefinedRange.Start.Line == -1 && - undefinedRange.Start.Character == -1 && - undefinedRange.End.Line == -1 && - undefinedRange.End.Character == -1, - $"{nameof(RoslynLspFactory)}.{nameof(UndefinedRange)} has been corrupted. Current value: {undefinedRange.ToDisplayString()}"); - - return undefinedRange; - } - } - - public static Position CreatePosition(int line, int character) - => (line, character) switch - { - (0, 0) => DefaultPosition, - (-1, -1) => UndefinedPosition, - _ => new(line, character) - }; - - public static Position CreatePosition(LinePosition linePosition) - => CreatePosition(linePosition.Line, linePosition.Character); - - public static Position CreatePosition((int line, int character) position) - => CreatePosition(position.line, position.character); - - public static Range CreateRange(int startLine, int startCharacter, int endLine, int endCharacter) - => startLine == endLine && startCharacter == endCharacter - ? CreateZeroWidthRange(startLine, startCharacter) - : CreateRange(CreatePosition(startLine, startCharacter), CreatePosition(endLine, endCharacter)); - - public static Range CreateRange(Position start, Position end) - => new() { Start = start, End = end }; - - public static Range CreateRange(LinePosition start, LinePosition end) - => CreateRange(start.Line, start.Character, end.Line, end.Character); - - public static Range CreateRange((int line, int character) start, (int line, int character) end) - => CreateRange(start.line, start.character, end.line, end.character); - - public static Range CreateRange(LinePositionSpan span) - => CreateRange(span.Start, span.End); - - public static Range CreateZeroWidthRange(int line, int character) - => (line, character) switch - { - (0, 0) => DefaultRange, - (-1, -1) => UndefinedRange, - _ => CreateZeroWidthRange(CreatePosition(line, character)) - }; - - public static Range CreateZeroWidthRange(Position position) - => CreateRange(position, position); - - public static Range CreateZeroWidthRange(LinePosition position) - => CreateRange(position, position); - - public static Range CreateZeroWidthRange((int line, int character) position) - => CreateRange(position, position); - - public static Range CreateSingleLineRange(int line, int character, int length) - => CreateRange(line, character, line, character + length); - - public static Range CreateSingleLineRange(Position start, int length) - => CreateRange(start, CreatePosition(start.Line, start.Character + length)); - - public static Range CreateSingleLineRange(LinePosition start, int length) - => CreateSingleLineRange(start.Line, start.Character, length); - - public static Range CreateSingleLineRange((int line, int character) start, int length) - => CreateRange(CreatePosition(start), CreatePosition(start.line, start.character + length)); - - public static TextEdit CreateTextEdit(Range range, string newText) - => new() { Range = range, NewText = newText }; - - public static TextEdit CreateTextEdit(LinePositionSpan span, string newText) - => CreateTextEdit(CreateRange(span), newText); - - public static TextEdit CreateTextEdit(int startLine, int startCharacter, int endLine, int endCharacter, string newText) - => CreateTextEdit(CreateRange(startLine, startCharacter, endLine, endCharacter), newText); - - public static TextEdit CreateTextEdit(Position start, Position end, string newText) - => CreateTextEdit(CreateRange(start, end), newText); - - public static TextEdit CreateTextEdit(LinePosition start, LinePosition end, string newText) - => CreateTextEdit(CreateRange(start, end), newText); - - public static TextEdit CreateTextEdit((int line, int character) start, (int line, int character) end, string newText) - => CreateTextEdit(CreateRange(start, end), newText); - - public static TextEdit CreateTextEdit(int line, int character, string newText) - => CreateTextEdit(CreateZeroWidthRange(line, character), newText); - - public static TextEdit CreateTextEdit(Position position, string newText) - => CreateTextEdit(CreateZeroWidthRange(position), newText); - - public static TextEdit CreateTextEdit(LinePosition position, string newText) - => CreateTextEdit(CreateZeroWidthRange(position.Line, position.Character), newText); - - public static TextEdit CreateTextEdit((int line, int character) position, string newText) - => CreateTextEdit(CreateZeroWidthRange(position), newText); -} From b0dcedba1bf3b52f26fd72a1d2a0e0d6e5825777 Mon Sep 17 00:00:00 2001 From: David Wengier Date: Tue, 30 Jul 2024 11:28:08 +1000 Subject: [PATCH 03/20] Rename VsLsp* and RoslynLsp* to just Lsp* This commit done entirely via Replace In Files --- .../RazorDiagnosticsBenchmark.cs | 4 +- .../RazorSemanticTokensBenchmark.cs | 2 +- ...zorSemanticTokensRangeEndpointBenchmark.cs | 2 +- .../RazorSemanticTokensScrollingBenchmark.cs | 2 +- .../AutoClosingTagOnAutoInsertProvider.cs | 4 +- .../CloseTextTagOnAutoInsertProvider.cs | 2 +- .../TypeAccessibilityCodeActionProvider.cs | 2 +- .../Razor/AddUsingsCodeActionResolver.cs | 6 +-- .../CodeActions/Razor/CodeBlockService.cs | 10 ++--- ...omponentAccessibilityCodeActionProvider.cs | 4 +- .../CreateComponentCodeActionResolver.cs | 2 +- .../ExtractToCodeBehindCodeActionResolver.cs | 4 +- .../Razor/GenerateMethodCodeActionResolver.cs | 6 +-- .../DelegatedCompletionListProvider.cs | 4 +- .../Delegation/TextEditResponseRewriter.cs | 4 +- .../Definition/DefinitionEndpoint.cs | 2 +- .../RazorTranslateDiagnosticsService.cs | 4 +- ...actTextDocumentPresentationEndpointBase.cs | 2 +- .../TextDocumentUriPresentationEndpoint.cs | 2 +- .../Formatting/CSharpOnTypeFormattingPass.cs | 4 +- .../Formatting/RazorFormattingPass.cs | 14 +++--- .../MapCode/MapCodeEndpoint.cs | 4 +- .../RazorMapToDocumentRangesEndpoint.cs | 2 +- .../Refactoring/RenameEndpoint.cs | 4 +- .../LSPCSharpSemanticTokensProvider.cs | 2 +- .../AbstractRazorDocumentMappingService.cs | 12 ++--- .../Extensions/LspExtensions_LinePosition.cs | 6 +-- .../LspExtensions_LinePositionSpan.cs | 4 +- .../Extensions/LspExtensions_Position.cs | 4 +- .../Extensions/LspExtensions_Range.cs | 6 +-- .../LspExtensions_RazorSyntaxTree.cs | 2 +- .../Extensions/LspExtensions_SourceText.cs | 4 +- .../Extensions/LspExtensions_SumTypes.cs | 2 +- .../Extensions/LspExtensions_SyntaxNode.cs | 6 +-- .../Extensions/LspExtensions_TextChange.cs | 2 +- .../LspExtensions_TextDocumentIdentifier.cs | 2 +- ...Extensions_VSInternalClientCapabilities.cs | 2 +- .../LspExtensions_VSProjectContext.cs | 2 +- .../Extensions/LspExtensions_WorkspaceEdit.cs | 2 +- .../Extensions/LspFactory.cs | 10 ++--- .../RemoteDocumentHighlight.cs | 4 +- .../RemoteDocumentHighlightService.cs | 6 +-- .../Cohost/CohostSignatureHelpEndpoint.cs | 6 +-- .../DefaultRazorBreakpointResolver.cs | 2 +- ...DefaultRazorProximityExpressionResolver.cs | 2 +- .../RazorCustomMessageTarget_Completion.cs | 6 +-- .../OnAutoInsertEndpointTest.NetFx.cs | 20 ++++----- .../AutoInsert/OnAutoInsertEndpointTest.cs | 8 ++-- .../DefaultCSharpCodeActionProviderTest.cs | 16 +++---- .../DefaultCSharpCodeActionResolverTest.cs | 8 ++-- ...TypeAccessibilityCodeActionProviderTest.cs | 18 ++++---- .../CodeActions/CodeActionEndpointTest.cs | 38 ++++++++-------- .../Html/DefaultHtmlCodeActionProviderTest.cs | 8 ++-- .../Html/DefaultHtmlCodeActionResolverTest.cs | 4 +- ...nentAccessibilityCodeActionProviderTest.cs | 22 +++++----- ...tractToCodeBehindCodeActionProviderTest.cs | 20 ++++----- ...legatedCompletionItemResolverTest.NetFx.cs | 4 +- .../DelegatedCompletionListProviderTest.cs | 6 +-- .../TextEditResponseRewriterTest.cs | 12 ++--- .../Completion/RazorCompletionEndpointTest.cs | 4 +- .../RazorBreakpointSpanEndpointTest.cs | 26 +++++------ .../RazorProximityExpressionsEndpointTest.cs | 10 ++--- .../RazorDiagnosticConverterTest.cs | 8 ++-- .../RazorDiagnosticsPublisherTest.cs | 4 +- ...xtDocumentTextPresentationEndpointTests.cs | 8 ++-- ...extDocumentUriPresentationEndpointTests.cs | 22 +++++----- .../DocumentDidChangeEndpointTest.cs | 10 ++--- .../DocumentOnTypeFormattingEndpointTest.cs | 10 ++--- .../FormattingContentValidationPassTest.cs | 4 +- .../FormattingDiagnosticValidationPassTest.cs | 8 ++-- .../FormattingLanguageServerClient.cs | 2 +- .../Formatting_NetFx/FormattingTestBase.cs | 2 +- .../RazorFormattingServiceTest.cs | 4 +- .../Hover/HoverServiceTest.cs | 40 ++++++++--------- .../InlayHints/InlayHintEndpointTest.cs | 2 +- .../LinkedEditingRangeEndpointTest.cs | 44 +++++++++---------- .../Mapping/RazorLanguageQueryEndpointTest.cs | 8 ++-- .../RazorMapToDocumentRangesEndpointTest.cs | 24 +++++----- .../RangeExtensionsTests.cs | 20 ++++----- .../Refactoring/RenameEndpointTest.cs | 26 +++++------ .../WrapWithTag/WrapWithTagEndpointTests.cs | 38 ++++++++-------- .../CohostUriPresentationEndpointTest.cs | 4 +- .../DefaultRazorBreakpointResolverTest.cs | 4 +- .../DefaultLSPDocumentMappingProviderTest.cs | 8 ++-- .../RazorCustomMessageTargetTest.cs | 12 ++--- .../RazorLSPSpanMappingServiceTest.cs | 4 +- .../LanguageClient/TestDocumentManager.cs | 2 +- ...anguageService_IVsLanguageDebugInfoTest.cs | 2 +- 88 files changed, 367 insertions(+), 367 deletions(-) diff --git a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorDiagnosticsBenchmark.cs b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorDiagnosticsBenchmark.cs index 7cb21677aa5..f1878b7f567 100644 --- a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorDiagnosticsBenchmark.cs +++ b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorDiagnosticsBenchmark.cs @@ -207,8 +207,8 @@ public Task SendRequestAsync(string method, TPara } } - private Range InRange { get; set; } = VsLspFactory.CreateSingleLineRange(line: 85, character: 8, length: 8); - private Range OutRange { get; set; } = VsLspFactory.CreateSingleLineRange(line: 6, character: 8, length: 8); + private Range InRange { get; set; } = LspFactory.CreateSingleLineRange(line: 85, character: 8, length: 8); + private Range OutRange { get; set; } = LspFactory.CreateSingleLineRange(line: 6, character: 8, length: 8); private Diagnostic[] GetDiagnostics(int n) => Enumerable.Range(1, n).Select(_ => new Diagnostic() { diff --git a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensBenchmark.cs b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensBenchmark.cs index 6f053edeadc..2c5dd603ac1 100644 --- a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensBenchmark.cs +++ b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensBenchmark.cs @@ -66,7 +66,7 @@ public async Task InitializeRazorSemanticAsync() DocumentContext = new VersionedDocumentContext(documentUri, documentSnapshot, projectContext: null, version); var text = await DocumentContext.GetSourceTextAsync(CancellationToken.None).ConfigureAwait(false); - Range = VsLspFactory.CreateRange( + Range = LspFactory.CreateRange( start: (0, 0), end: (text.Lines.Count - 1, text.Lines[^1].Span.Length - 1)); } diff --git a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensRangeEndpointBenchmark.cs b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensRangeEndpointBenchmark.cs index 6bd676543de..4f30af12f11 100644 --- a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensRangeEndpointBenchmark.cs +++ b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensRangeEndpointBenchmark.cs @@ -79,7 +79,7 @@ public async Task InitializeRazorSemanticAsync() SemanticTokensRangeEndpoint = new SemanticTokensRangeEndpoint(RazorSemanticTokenService, razorSemanticTokensLegendService, razorOptionsMonitor, telemetryReporter: null); var text = await DocumentContext.GetSourceTextAsync(CancellationToken.None).ConfigureAwait(false); - Range = VsLspFactory.CreateRange( + Range = LspFactory.CreateRange( start: (0, 0), end: (text.Lines.Count - 1, text.Lines[^1].Span.Length - 1)); diff --git a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensScrollingBenchmark.cs b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensScrollingBenchmark.cs index 4063270b669..f08d37cbf34 100644 --- a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensScrollingBenchmark.cs +++ b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensScrollingBenchmark.cs @@ -55,7 +55,7 @@ public async Task InitializeRazorSemanticAsync() DocumentContext = new VersionedDocumentContext(documentUri, documentSnapshot, projectContext: null, version: 1); var text = await DocumentSnapshot.GetTextAsync().ConfigureAwait(false); - Range = VsLspFactory.CreateRange( + Range = LspFactory.CreateRange( start: (0, 0), end: (text.Lines.Count - 1, 0)); } diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/AutoClosingTagOnAutoInsertProvider.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/AutoClosingTagOnAutoInsertProvider.cs index e216c899d0d..c553ce23987 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/AutoClosingTagOnAutoInsertProvider.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/AutoClosingTagOnAutoInsertProvider.cs @@ -68,7 +68,7 @@ public bool TryResolveInsertion(Position position, FormattingContext context, [N if (autoClosingBehavior == AutoClosingBehavior.EndTag) { format = InsertTextFormat.Snippet; - edit = VsLspFactory.CreateTextEdit(position, $"$0"); + edit = LspFactory.CreateTextEdit(position, $"$0"); return true; } @@ -79,7 +79,7 @@ public bool TryResolveInsertion(Position position, FormattingContext context, [N // Need to replace the `>` with ' />$0' or '/>$0' depending on if there's prefixed whitespace. var insertionText = char.IsWhiteSpace(context.SourceText[afterCloseAngleIndex - 2]) ? "/" : " /"; - edit = VsLspFactory.CreateTextEdit(position.Line, position.Character - 1, insertionText); + edit = LspFactory.CreateTextEdit(position.Line, position.Character - 1, insertionText); return true; } diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/CloseTextTagOnAutoInsertProvider.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/CloseTextTagOnAutoInsertProvider.cs index 8ce976721ee..c644948cfd3 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/CloseTextTagOnAutoInsertProvider.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/CloseTextTagOnAutoInsertProvider.cs @@ -38,7 +38,7 @@ public bool TryResolveInsertion(Position position, FormattingContext context, [N // This is a text tag. format = InsertTextFormat.Snippet; - edit = VsLspFactory.CreateTextEdit(position, $"$0"); + edit = LspFactory.CreateTextEdit(position, $"$0"); return true; } diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/CSharp/TypeAccessibilityCodeActionProvider.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/CSharp/TypeAccessibilityCodeActionProvider.cs index 0cbd6d6f4a6..e89d2880f55 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/CSharp/TypeAccessibilityCodeActionProvider.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/CSharp/TypeAccessibilityCodeActionProvider.cs @@ -261,7 +261,7 @@ private static RazorVSInternalCodeAction CreateFQNCodeAction( { var codeDocumentIdentifier = new OptionalVersionedTextDocumentIdentifier() { Uri = context.Request.TextDocument.Uri }; - var fqnTextEdit = VsLspFactory.CreateTextEdit(fqnDiagnostic.Range, fullyQualifiedName); + var fqnTextEdit = LspFactory.CreateTextEdit(fqnDiagnostic.Range, fullyQualifiedName); var fqnWorkspaceEditDocumentChange = new TextDocumentEdit() { diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/AddUsingsCodeActionResolver.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/AddUsingsCodeActionResolver.cs index 5923d2ed861..ea5b810adfc 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/AddUsingsCodeActionResolver.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/AddUsingsCodeActionResolver.cs @@ -123,7 +123,7 @@ private static TextDocumentEdit GenerateSingleUsingEditsInterpolated( if (string.CompareOrdinal(newUsingNamespace, usingDirectiveNamespace) < 0) { var usingDirectiveLineIndex = codeDocument.Source.Text.GetLinePosition(usingDirective.Node.Span.Start).Line; - var edit = VsLspFactory.CreateTextEdit(line: usingDirectiveLineIndex, character: 0, newText); + var edit = LspFactory.CreateTextEdit(line: usingDirectiveLineIndex, character: 0, newText); edits.Add(edit); break; } @@ -134,7 +134,7 @@ private static TextDocumentEdit GenerateSingleUsingEditsInterpolated( { var endIndex = existingUsingDirectives[^1].Node.Span.End; var lineIndex = GetLineIndexOrEnd(codeDocument, endIndex - 1) + 1; - var edit = VsLspFactory.CreateTextEdit(line: lineIndex, character: 0, newText); + var edit = LspFactory.CreateTextEdit(line: lineIndex, character: 0, newText); edits.Add(edit); } @@ -168,7 +168,7 @@ private static TextDocumentEdit GenerateSingleUsingEditsAtTop( return new TextDocumentEdit { TextDocument = codeDocumentIdentifier, - Edits = [VsLspFactory.CreateTextEdit(insertPosition, newText: $"@using {newUsingNamespace}{Environment.NewLine}")] + Edits = [LspFactory.CreateTextEdit(insertPosition, newText: $"@using {newUsingNamespace}{Environment.NewLine}")] }; } diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/CodeBlockService.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/CodeBlockService.cs index 9cda5df9204..62ece3f7a58 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/CodeBlockService.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/CodeBlockService.cs @@ -60,10 +60,10 @@ public static TextEdit[] CreateFormattedTextEdit(RazorCodeDocument code, string codeBlockStartText = $"{Environment.NewLine}{codeBlockStartText}"; } - var eofRange = VsLspFactory.CreateZeroWidthRange(lastCharacterLocation.LineNumber, insertCharacterIndex); - var start = VsLspFactory.CreateTextEdit(eofRange, codeBlockStartText); - var method = VsLspFactory.CreateTextEdit(eofRange, indentedMethod); - var end = VsLspFactory.CreateTextEdit(eofRange, Environment.NewLine + "}"); + var eofRange = LspFactory.CreateZeroWidthRange(lastCharacterLocation.LineNumber, insertCharacterIndex); + var start = LspFactory.CreateTextEdit(eofRange, codeBlockStartText); + var method = LspFactory.CreateTextEdit(eofRange, indentedMethod); + var end = LspFactory.CreateTextEdit(eofRange, Environment.NewLine + "}"); return [start, method, end]; } @@ -93,7 +93,7 @@ public static TextEdit[] CreateFormattedTextEdit(RazorCodeDocument code, string ? closeBraceLocation.CharacterIndex : 0; - return [VsLspFactory.CreateTextEdit(insertLineLocation.LineIndex, insertCharacter, formattedGeneratedMethod)]; + return [LspFactory.CreateTextEdit(insertLineLocation.LineIndex, insertCharacter, formattedGeneratedMethod)]; } private static string FormatMethodInCodeBlock( diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/ComponentAccessibilityCodeActionProvider.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/ComponentAccessibilityCodeActionProvider.cs index 1404d1910a9..907ac96017c 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/ComponentAccessibilityCodeActionProvider.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/ComponentAccessibilityCodeActionProvider.cs @@ -276,14 +276,14 @@ private static WorkspaceEdit CreateRenameTagEdit(RazorCodeActionContext context, using var textEdits = new PooledArrayBuilder(); var codeDocumentIdentifier = new OptionalVersionedTextDocumentIdentifier() { Uri = context.Request.TextDocument.Uri }; - var startTagTextEdit = VsLspFactory.CreateTextEdit(startTag.Name.GetRange(context.CodeDocument.Source), newTagName); + var startTagTextEdit = LspFactory.CreateTextEdit(startTag.Name.GetRange(context.CodeDocument.Source), newTagName); textEdits.Add(startTagTextEdit); var endTag = (startTag.Parent as MarkupElementSyntax)?.EndTag; if (endTag != null) { - var endTagTextEdit = VsLspFactory.CreateTextEdit(endTag.Name.GetRange(context.CodeDocument.Source), newTagName); + var endTagTextEdit = LspFactory.CreateTextEdit(endTag.Name.GetRange(context.CodeDocument.Source), newTagName); textEdits.Add(endTagTextEdit); } diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/CreateComponentCodeActionResolver.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/CreateComponentCodeActionResolver.cs index 75d538382ab..29ddff07cc5 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/CreateComponentCodeActionResolver.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/CreateComponentCodeActionResolver.cs @@ -85,7 +85,7 @@ private static void TryAddNamespaceDirective(RazorCodeDocument codeDocument, Uri documentChanges.Add(new TextDocumentEdit { TextDocument = documentIdentifier, - Edits = [VsLspFactory.CreateTextEdit(position: (0, 0), namespaceDirective.GetContent())] + Edits = [LspFactory.CreateTextEdit(position: (0, 0), namespaceDirective.GetContent())] }); } } diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/ExtractToCodeBehindCodeActionResolver.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/ExtractToCodeBehindCodeActionResolver.cs index 74a832a0f2b..886dd50da75 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/ExtractToCodeBehindCodeActionResolver.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/ExtractToCodeBehindCodeActionResolver.cs @@ -96,12 +96,12 @@ internal sealed class ExtractToCodeBehindCodeActionResolver( new TextDocumentEdit { TextDocument = codeDocumentIdentifier, - Edits = [VsLspFactory.CreateTextEdit(removeRange, string.Empty)] + Edits = [LspFactory.CreateTextEdit(removeRange, string.Empty)] }, new TextDocumentEdit { TextDocument = codeBehindDocumentIdentifier, - Edits = [VsLspFactory.CreateTextEdit(position: (0, 0), codeBehindContent)] + Edits = [LspFactory.CreateTextEdit(position: (0, 0), codeBehindContent)] } }; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/GenerateMethodCodeActionResolver.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/GenerateMethodCodeActionResolver.cs index f79fe80a516..3168e767478 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/GenerateMethodCodeActionResolver.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/GenerateMethodCodeActionResolver.cs @@ -112,7 +112,7 @@ razorClassName is null || classLocationLineSpan.StartLinePosition.Character, content); - var edit = VsLspFactory.CreateTextEdit( + var edit = LspFactory.CreateTextEdit( line: classLocationLineSpan.EndLinePosition.Line, character: 0, $"{formattedMethod}{Environment.NewLine}"); @@ -161,7 +161,7 @@ private async Task GenerateMethodInCodeBlockAsync( // just get the simplified text that comes back from Roslyn. var classLocationLineSpan = @class.GetLocation().GetLineSpan(); - var tempTextEdit = VsLspFactory.CreateTextEdit( + var tempTextEdit = LspFactory.CreateTextEdit( line: classLocationLineSpan.EndLinePosition.Line, character: 0, editToSendToRoslyn.NewText); @@ -192,7 +192,7 @@ private async Task GenerateMethodInCodeBlockAsync( .Replace(FormattingUtilities.InitialIndent, string.Empty) .Replace(FormattingUtilities.Indent, string.Empty); - var remappedEdit = VsLspFactory.CreateTextEdit(remappedRange, unformattedMethodSignature); + var remappedEdit = LspFactory.CreateTextEdit(remappedRange, unformattedMethodSignature); var delegatedParams = new DelegatedSimplifyMethodParams(documentContext.Identifier, RequiresVirtualDocument: true, remappedEdit); var result = await _clientConnection.SendRequestAsync( diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/DelegatedCompletionListProvider.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/DelegatedCompletionListProvider.cs index e830fee0ff0..a35d13bb895 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/DelegatedCompletionListProvider.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/DelegatedCompletionListProvider.cs @@ -214,11 +214,11 @@ private static VSInternalCompletionContext RewriteContext(VSInternalCompletionCo // Edit the CSharp projected document to contain a '.'. This allows C# completion to provide valid // completion items for moments when a user has typed a '.' that's typically interpreted as Html. - var addProvisionalDot = VsLspFactory.CreateTextEdit(previousPosition, "."); + var addProvisionalDot = LspFactory.CreateTextEdit(previousPosition, "."); var provisionalPositionInfo = new DocumentPositionInfo( RazorLanguageKind.CSharp, - VsLspFactory.CreatePosition( + LspFactory.CreatePosition( previousPosition.Line, previousPosition.Character + 1), previousCharacterPositionInfo.HostDocumentIndex + 1); diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/TextEditResponseRewriter.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/TextEditResponseRewriter.cs index fff2e226c9b..b25972b14ea 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/TextEditResponseRewriter.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/TextEditResponseRewriter.cs @@ -90,7 +90,7 @@ private static Range TranslateRange(Position hostDocumentPosition, Position proj var translatedStartPosition = TranslatePosition(offset, hostDocumentPosition, textEditRange.Start); var translatedEndPosition = TranslatePosition(offset, hostDocumentPosition, textEditRange.End); - return VsLspFactory.CreateRange(translatedStartPosition, translatedEndPosition); + return LspFactory.CreateRange(translatedStartPosition, translatedEndPosition); static Position TranslatePosition(int offset, Position hostDocumentPosition, Position editPosition) { @@ -98,7 +98,7 @@ static Position TranslatePosition(int offset, Position hostDocumentPosition, Pos // Note: If this completion handler ever expands to deal with multi-line TextEdits, this logic will likely need to change since // it assumes we're only dealing with single-line TextEdits. - return VsLspFactory.CreatePosition(hostDocumentPosition.Line, translatedCharacter); + return LspFactory.CreatePosition(hostDocumentPosition.Line, translatedCharacter); } } } diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Definition/DefinitionEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Definition/DefinitionEndpoint.cs index 3a6aad8e6f6..c772aff6175 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Definition/DefinitionEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Definition/DefinitionEndpoint.cs @@ -264,7 +264,7 @@ private async Task GetNavigateRangeAsync(IDocumentSnapshot documentSnapsh // If we were trying to navigate to a property, and we couldn't find it, we can at least take // them to the file for the component. If the property was defined in a partial class they can // at least then press F7 to go there. - return VsLspFactory.DefaultRange; + return LspFactory.DefaultRange; } internal static async Task TryGetPropertyRangeAsync(RazorCodeDocument codeDocument, string propertyName, IRazorDocumentMappingService documentMappingService, ILogger logger, CancellationToken cancellationToken) diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorTranslateDiagnosticsService.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorTranslateDiagnosticsService.cs index 7831e806f0b..7107ff409a0 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorTranslateDiagnosticsService.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorTranslateDiagnosticsService.cs @@ -474,7 +474,7 @@ private bool TryGetOriginalDiagnosticRange(Diagnostic diagnostic, RazorCodeDocum // For `Error` Severity diagnostics we still show the diagnostics to // the user, however we set the range to an undefined range to ensure // clicking on the diagnostic doesn't cause errors. - originalRange = VsLspFactory.UndefinedRange; + originalRange = LspFactory.UndefinedRange; } return true; @@ -544,7 +544,7 @@ private bool TryRemapRudeEditRange(Range diagnosticRange, RazorCodeDocument code var diagnosticEndWhitespaceOffset = diagnosticEndCharacter + 1; var endLinePosition = (endLineIndex, diagnosticEndWhitespaceOffset); - remappedRange = VsLspFactory.CreateRange(startLinePosition, endLinePosition); + remappedRange = LspFactory.CreateRange(startLinePosition, endLinePosition); return true; } } diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/AbstractTextDocumentPresentationEndpointBase.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/AbstractTextDocumentPresentationEndpointBase.cs index e2134c10ed2..e45daae36d9 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/AbstractTextDocumentPresentationEndpointBase.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/AbstractTextDocumentPresentationEndpointBase.cs @@ -238,7 +238,7 @@ private TextEdit[] MapTextEdits(bool mapRanges, RazorCodeDocument codeDocument, return []; } - var newEdit = VsLspFactory.CreateTextEdit(newRange, edit.NewText); + var newEdit = LspFactory.CreateTextEdit(newRange, edit.NewText); mappedEdits.Add(newEdit); } diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/TextDocumentUriPresentationEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/TextDocumentUriPresentationEndpoint.cs index 72cf2558498..8d1d0392421 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/TextDocumentUriPresentationEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/TextDocumentUriPresentationEndpoint.cs @@ -76,7 +76,7 @@ protected override IRazorPresentationParams CreateRazorRequestParameters(UriPres { Uri = request.TextDocument.Uri }, - Edits = [VsLspFactory.CreateTextEdit(request.Range, componentTagText)] + Edits = [LspFactory.CreateTextEdit(request.Range, componentTagText)] } } }; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpOnTypeFormattingPass.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpOnTypeFormattingPass.cs index 1c60b4fa464..029d4abade1 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpOnTypeFormattingPass.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpOnTypeFormattingPass.cs @@ -179,13 +179,13 @@ public async override Task ExecuteAsync(FormattingContext cont start = firstPosition; } - var end = VsLspFactory.CreatePosition(rangeAfterFormatting.End.Line + lineDelta, 0); + var end = LspFactory.CreatePosition(rangeAfterFormatting.End.Line + lineDelta, 0); if (lastPosition is not null && lastPosition.CompareTo(start) < 0) { end = lastPosition; } - var rangeToAdjust = VsLspFactory.CreateRange(start, end); + var rangeToAdjust = LspFactory.CreateRange(start, end); Debug.Assert(cleanedText.IsValidPosition(rangeToAdjust.End), "Invalid range. This is unexpected."); diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/RazorFormattingPass.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/RazorFormattingPass.cs index d4d86a468c9..389a1d71d50 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/RazorFormattingPass.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/RazorFormattingPass.cs @@ -117,7 +117,7 @@ directiveCode.Children is [RazorDirectiveSyntax directive] && else if (children.TryGetOpenBraceToken(out var brace)) { // If there is no whitespace at all we normalize to a single space - var edit = VsLspFactory.CreateTextEdit(brace.GetRange(source).Start, " "); + var edit = LspFactory.CreateTextEdit(brace.GetRange(source).Start, " "); edits.Add(edit); return true; @@ -279,7 +279,7 @@ private void TryFormatCSharpBlockStructure(FormattingContext context, List edits, R // If there is anything other than one single space then we replace with one space between directive and brace. // // ie, "@code {" will become "@code {" - var edit = VsLspFactory.CreateTextEdit(node.GetRange(source), " "); + var edit = LspFactory.CreateTextEdit(node.GetRange(source), " "); edits.Add(edit); } @@ -389,7 +389,7 @@ codeRange is not null && newText += FormattingUtilities.GetIndentationString(additionalIndentationLevel, context.Options.InsertSpaces, context.Options.TabSize); } - var edit = VsLspFactory.CreateTextEdit(openBraceRange.End, newText); + var edit = LspFactory.CreateTextEdit(openBraceRange.End, newText); edits.Add(edit); didFormat = true; } @@ -404,7 +404,7 @@ closeBraceRange is not null && { // If we have a directive, then we line the close brace up with it, and ensure // there is a close brace - var edit = VsLspFactory.CreateTextEdit(start: codeRange.End, end: closeBraceRange.Start, + var edit = LspFactory.CreateTextEdit(start: codeRange.End, end: closeBraceRange.Start, context.NewLineString + FormattingUtilities.GetIndentationString( directiveNode.GetRange(source).Start.Character, context.Options.InsertSpaces, context.Options.TabSize)); @@ -414,7 +414,7 @@ closeBraceRange is not null && else if (codeRange.End.Line == closeBraceRange.Start.Line) { // Add a Newline between the content and the "}" if one doesn't already exist. - var edit = VsLspFactory.CreateTextEdit(codeRange.End, context.NewLineString); + var edit = LspFactory.CreateTextEdit(codeRange.End, context.NewLineString); edits.Add(edit); didFormat = true; } diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/MapCode/MapCodeEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/MapCode/MapCodeEndpoint.cs index f076c975592..5887fa977fa 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/MapCode/MapCodeEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/MapCode/MapCodeEndpoint.cs @@ -236,7 +236,7 @@ private async Task TryMapCodeAsync( if (insertionSpan is not null) { var textSpan = new TextSpan(insertionSpan.Value, 0); - var edit = VsLspFactory.CreateTextEdit(sourceText.GetRange(textSpan), nodeToMap.ToFullString()); + var edit = LspFactory.CreateTextEdit(sourceText.GetRange(textSpan), nodeToMap.ToFullString()); var textDocumentEdit = new TextDocumentEdit { @@ -440,7 +440,7 @@ async Task TryProcessEditAsync( return false; } - var textEdit = VsLspFactory.CreateTextEdit(hostDocumentRange, documentEdit.NewText); + var textEdit = LspFactory.CreateTextEdit(hostDocumentRange, documentEdit.NewText); var textDocumentEdit = new TextDocumentEdit { diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Mapping/RazorMapToDocumentRangesEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Mapping/RazorMapToDocumentRangesEndpoint.cs index 18f308dc13c..3bd789f83bb 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Mapping/RazorMapToDocumentRangesEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Mapping/RazorMapToDocumentRangesEndpoint.cs @@ -66,7 +66,7 @@ public Uri GetTextDocumentIdentifier(RazorMapToDocumentRangesParams request) !_documentMappingService.TryMapToHostDocumentRange(codeDocument.GetCSharpDocument(), projectedRange, request.MappingBehavior, out var originalRange)) { // All language queries on unsupported documents return Html. This is equivalent to what pre-VSCode Razor was capable of. - ranges[i] = VsLspFactory.UndefinedRange; + ranges[i] = LspFactory.UndefinedRange; continue; } diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Refactoring/RenameEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Refactoring/RenameEndpoint.cs index 761ae07fc07..2ece256074c 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Refactoring/RenameEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Refactoring/RenameEndpoint.cs @@ -320,11 +320,11 @@ private static TextEdit[] CreateEditsForMarkupTagHelperElement(MarkupTagHelperEl { using var _ = ListPool.GetPooledObject(out var edits); - edits.Add(VsLspFactory.CreateTextEdit(element.StartTag.Name.GetRange(codeDocument.Source), newName)); + edits.Add(LspFactory.CreateTextEdit(element.StartTag.Name.GetRange(codeDocument.Source), newName)); if (element.EndTag is MarkupTagHelperEndTagSyntax endTag) { - edits.Add(VsLspFactory.CreateTextEdit(endTag.Name.GetRange(codeDocument.Source), newName)); + edits.Add(LspFactory.CreateTextEdit(endTag.Name.GetRange(codeDocument.Source), newName)); } return [.. edits]; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Semantic/Services/LSPCSharpSemanticTokensProvider.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Semantic/Services/LSPCSharpSemanticTokensProvider.cs index 841b15ba463..641c91c7b92 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Semantic/Services/LSPCSharpSemanticTokensProvider.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Semantic/Services/LSPCSharpSemanticTokensProvider.cs @@ -50,7 +50,7 @@ internal class LSPCSharpSemanticTokensProvider(LanguageServerFeatureOptions lang // Likely the server doesn't support the new endpoint, fallback to the original one if (csharpResponse?.Tokens is null && csharpRanges.Length > 1) { - var minimalRange = VsLspFactory.CreateRange(csharpRanges[0].Start, csharpRanges[^1].End); + var minimalRange = LspFactory.CreateRange(csharpRanges[0].Start, csharpRanges[^1].End); var newParams = new ProvideSemanticTokensRangesParams( parameter.TextDocument, diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentMapping/AbstractRazorDocumentMappingService.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentMapping/AbstractRazorDocumentMappingService.cs index 03a99f532c1..96f490aa9cd 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentMapping/AbstractRazorDocumentMappingService.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentMapping/AbstractRazorDocumentMappingService.cs @@ -62,7 +62,7 @@ public TextEdit[] GetHostDocumentEdits(IRazorGeneratedDocument generatedDocument // between this edit and the previous one, because the normalization will have swallowed it. See // below for a more info. var newText = (lastNewLineAddedToLine == range.Start.Line ? " " : "") + edit.NewText; - hostDocumentEdits.Add(VsLspFactory.CreateTextEdit(hostDocumentStart!, hostDocumentEnd!, newText)); + hostDocumentEdits.Add(LspFactory.CreateTextEdit(hostDocumentStart!, hostDocumentEnd!, newText)); continue; } @@ -95,7 +95,7 @@ public TextEdit[] GetHostDocumentEdits(IRazorGeneratedDocument generatedDocument // so we can ignore all but the last line. This assert ensures that is true, just in case something changes in Roslyn Debug.Assert(lastNewLine == 0 || edit.NewText[..(lastNewLine - 1)].All(c => c == '\r' || c == '\n'), "We are throwing away part of an edit that has more than just empty lines!"); - var proposedRange = VsLspFactory.CreateSingleLineRange(range.End.Line, character: 0, length: range.End.Character); + var proposedRange = LspFactory.CreateSingleLineRange(range.End.Line, character: 0, length: range.End.Character); startSync = generatedDocumentSourceText.TryGetAbsoluteIndex(proposedRange.Start, out startIndex); endSync = generatedDocumentSourceText.TryGetAbsoluteIndex(proposedRange.End, out endIndex); if (startSync is false || endSync is false) @@ -108,7 +108,7 @@ public TextEdit[] GetHostDocumentEdits(IRazorGeneratedDocument generatedDocument if (mappedStart && mappedEnd) { - hostDocumentEdits.Add(VsLspFactory.CreateTextEdit(hostDocumentStart!, hostDocumentEnd!, edit.NewText[lastNewLine..])); + hostDocumentEdits.Add(LspFactory.CreateTextEdit(hostDocumentStart!, hostDocumentEnd!, edit.NewText[lastNewLine..])); continue; } } @@ -161,13 +161,13 @@ public TextEdit[] GetHostDocumentEdits(IRazorGeneratedDocument generatedDocument // If we already added a newline to this line, then we don't want to add another one, but // we do need to add a space between this edit and the previous one, because the normalization // will have swallowed it. - hostDocumentEdits.Add(VsLspFactory.CreateTextEdit(hostDocumentIndex, " " + edit.NewText)); + hostDocumentEdits.Add(LspFactory.CreateTextEdit(hostDocumentIndex, " " + edit.NewText)); } else { // Otherwise, add a newline and the real content, and remember where we added it lastNewLineAddedToLine = range.Start.Line; - hostDocumentEdits.Add(VsLspFactory.CreateTextEdit( + hostDocumentEdits.Add(LspFactory.CreateTextEdit( hostDocumentIndex, Environment.NewLine + new string(' ', range.Start.Character) + edit.NewText)); } @@ -867,7 +867,7 @@ private TextEdit[] RemapTextEditsCore(Uri generatedDocumentUri, RazorCodeDocumen continue; } - var edit = VsLspFactory.CreateTextEdit(originalRange, edits[i].NewText); + var edit = LspFactory.CreateTextEdit(originalRange, edits[i].NewText); remappedEdits.Add(edit); } diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePosition.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePosition.cs index 8beb8510be0..0eee990af2f 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePosition.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePosition.cs @@ -5,11 +5,11 @@ namespace Microsoft.VisualStudio.LanguageServer.Protocol; -internal static partial class VsLspExtensions +internal static partial class LspExtensions { public static Position ToPosition(this LinePosition linePosition) - => VsLspFactory.CreatePosition(linePosition.Line, linePosition.Character); + => LspFactory.CreatePosition(linePosition.Line, linePosition.Character); public static Range ToZeroWidthRange(this LinePosition position) - => VsLspFactory.CreateZeroWidthRange(position); + => LspFactory.CreateZeroWidthRange(position); } diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePositionSpan.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePositionSpan.cs index 270532bb5ab..84fbf51ceb8 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePositionSpan.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePositionSpan.cs @@ -5,8 +5,8 @@ namespace Microsoft.VisualStudio.LanguageServer.Protocol; -internal static partial class VsLspExtensions +internal static partial class LspExtensions { public static Range ToRange(this LinePositionSpan linePositionSpan) - => VsLspFactory.CreateRange(linePositionSpan); + => LspFactory.CreateRange(linePositionSpan); } diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Position.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Position.cs index df93c93333f..e134672b0a9 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Position.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Position.cs @@ -5,7 +5,7 @@ namespace Microsoft.VisualStudio.LanguageServer.Protocol; -internal static partial class VsLspExtensions +internal static partial class LspExtensions { public static void Deconstruct(this Position position, out int line, out int character) => (line, character) = (position.Line, position.Character); @@ -14,7 +14,7 @@ public static LinePosition ToLinePosition(this Position position) => new(position.Line, position.Character); public static Range ToZeroWidthRange(this Position position) - => VsLspFactory.CreateZeroWidthRange(position); + => LspFactory.CreateZeroWidthRange(position); public static int CompareTo(this Position position, Position other) { diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Range.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Range.cs index ce405277933..7e2d82e730c 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Range.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Range.cs @@ -5,7 +5,7 @@ namespace Microsoft.VisualStudio.LanguageServer.Protocol; -internal static partial class VsLspExtensions +internal static partial class LspExtensions { public static void Deconstruct(this Range range, out Position start, out Position end) => (start, end) = (range.Start, range.End); @@ -77,7 +77,7 @@ public static bool IsSingleLine(this Range range) public static bool IsUndefined(this Range range) { - return range == VsLspFactory.UndefinedRange; + return range == LspFactory.UndefinedRange; } public static bool IsZeroWidth(this Range range) @@ -114,7 +114,7 @@ public static int CompareTo(this Range range1, Range range2) // Empty ranges do not overlap with any range. if (overlapStart.CompareTo(overlapEnd) < 0) { - return VsLspFactory.CreateRange(overlapStart, overlapEnd); + return LspFactory.CreateRange(overlapStart, overlapEnd); } return null; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_RazorSyntaxTree.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_RazorSyntaxTree.cs index 1bd0773e024..0316dfc4624 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_RazorSyntaxTree.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_RazorSyntaxTree.cs @@ -7,7 +7,7 @@ namespace Microsoft.VisualStudio.LanguageServer.Protocol; -internal static partial class VsLspExtensions +internal static partial class LspExtensions { public static SyntaxNode? FindInnermostNode( this RazorSyntaxTree syntaxTree, diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SourceText.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SourceText.cs index 0df608360b8..9122e5b2deb 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SourceText.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SourceText.cs @@ -7,7 +7,7 @@ namespace Microsoft.VisualStudio.LanguageServer.Protocol; -internal static partial class VsLspExtensions +internal static partial class LspExtensions { public static int GetPosition(this SourceText text, Position position) => text.GetPosition(position.ToLinePosition()); @@ -46,5 +46,5 @@ public static TextChange GetTextChange(this SourceText text, TextEdit edit) => new(text.GetTextSpan(edit.Range), edit.NewText); public static TextEdit GetTextEdit(this SourceText text, TextChange change) - => VsLspFactory.CreateTextEdit(text.GetRange(change.Span), change.NewText.AssumeNotNull()); + => LspFactory.CreateTextEdit(text.GetRange(change.Span), change.NewText.AssumeNotNull()); } diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SumTypes.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SumTypes.cs index 6c75dd21d31..7da5906093f 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SumTypes.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SumTypes.cs @@ -7,7 +7,7 @@ namespace Microsoft.VisualStudio.LanguageServer.Protocol; -internal static partial class VsLspExtensions +internal static partial class LspExtensions { internal static int Count(this SumType[]> sumType) { diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SyntaxNode.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SyntaxNode.cs index 92c243bacb5..ad3dcf3e744 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SyntaxNode.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SyntaxNode.cs @@ -9,13 +9,13 @@ namespace Microsoft.VisualStudio.LanguageServer.Protocol; -internal static partial class VsLspExtensions +internal static partial class LspExtensions { public static Range GetRange(this SyntaxNode node, RazorSourceDocument source) { var linePositionSpan = node.GetLinePositionSpan(source); - return VsLspFactory.CreateRange(linePositionSpan); + return LspFactory.CreateRange(linePositionSpan); } public static Range? GetRangeWithoutWhitespace(this SyntaxNode node, RazorSourceDocument source) @@ -52,7 +52,7 @@ public static Range GetRange(this SyntaxNode node, RazorSourceDocument source) var startPositionSpan = GetLinePositionSpan(firstToken, source, node.SpanStart); var endPositionSpan = GetLinePositionSpan(lastToken, source, node.SpanStart); - return VsLspFactory.CreateRange(startPositionSpan.Start, endPositionSpan.End); + return LspFactory.CreateRange(startPositionSpan.Start, endPositionSpan.End); // This is needed because SyntaxToken positions taken from GetTokens // are relative to their parent node and not to the document. diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_TextChange.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_TextChange.cs index 5feb06ba64f..36077f4b831 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_TextChange.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_TextChange.cs @@ -6,7 +6,7 @@ namespace Microsoft.VisualStudio.LanguageServer.Protocol; -internal static partial class VsLspExtensions +internal static partial class LspExtensions { public static RazorTextChange ToRazorTextChange(this TextChange textChange) { diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_TextDocumentIdentifier.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_TextDocumentIdentifier.cs index 44017ad6256..9029bc33fdd 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_TextDocumentIdentifier.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_TextDocumentIdentifier.cs @@ -3,7 +3,7 @@ namespace Microsoft.VisualStudio.LanguageServer.Protocol; -internal static partial class VsLspExtensions +internal static partial class LspExtensions { public static VSProjectContext? GetProjectContext(this TextDocumentIdentifier textDocumentIdentifier) => textDocumentIdentifier is VSTextDocumentIdentifier vsIdentifier diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_VSInternalClientCapabilities.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_VSInternalClientCapabilities.cs index ef801c03cec..f1e3a5e0373 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_VSInternalClientCapabilities.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_VSInternalClientCapabilities.cs @@ -3,7 +3,7 @@ namespace Microsoft.VisualStudio.LanguageServer.Protocol; -internal static partial class VsLspExtensions +internal static partial class LspExtensions { internal static VSInternalClientCapabilities ToVSInternalClientCapabilities(this ClientCapabilities clientCapabilities) { diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_VSProjectContext.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_VSProjectContext.cs index 959c14c116a..8bd3e97e1e4 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_VSProjectContext.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_VSProjectContext.cs @@ -5,7 +5,7 @@ namespace Microsoft.VisualStudio.LanguageServer.Protocol; -internal static partial class VsLspExtensions +internal static partial class LspExtensions { internal static ProjectKey ToProjectKey(this VSProjectContext projectContext) { diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_WorkspaceEdit.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_WorkspaceEdit.cs index 7c732521908..6178287c63e 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_WorkspaceEdit.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_WorkspaceEdit.cs @@ -6,7 +6,7 @@ namespace Microsoft.VisualStudio.LanguageServer.Protocol; -internal static partial class VsLspExtensions +internal static partial class LspExtensions { public static bool TryGetDocumentChanges(this WorkspaceEdit workspaceEdit, [NotNullWhen(true)] out TextDocumentEdit[]? documentChanges) { diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspFactory.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspFactory.cs index 5b29d44cc60..182a0c45a79 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspFactory.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspFactory.cs @@ -6,7 +6,7 @@ namespace Microsoft.VisualStudio.LanguageServer.Protocol; -internal static class VsLspFactory +internal static class LspFactory { private static readonly Position s_defaultPosition = new(0, 0); @@ -37,7 +37,7 @@ public static Position DefaultPosition Debug.Assert( defaultPosition.Line == 0 && defaultPosition.Character == 0, - $"{nameof(VsLspFactory)}.{nameof(DefaultPosition)} has been corrupted. Current value: {defaultPosition.ToDisplayString()}"); + $"{nameof(LspFactory)}.{nameof(DefaultPosition)} has been corrupted. Current value: {defaultPosition.ToDisplayString()}"); return defaultPosition; } @@ -59,7 +59,7 @@ public static Range DefaultRange defaultRange.Start.Character == 0 && defaultRange.End.Line == 0 && defaultRange.End.Character == 0, - $"{nameof(VsLspFactory)}.{nameof(DefaultRange)} has been corrupted. Current value: {defaultRange.ToDisplayString()}"); + $"{nameof(LspFactory)}.{nameof(DefaultRange)} has been corrupted. Current value: {defaultRange.ToDisplayString()}"); return defaultRange; } @@ -75,7 +75,7 @@ public static Position UndefinedPosition Debug.Assert( undefinedPosition.Line == -1 && undefinedPosition.Character == -1, - $"{nameof(VsLspFactory)}.{nameof(UndefinedPosition)} has been corrupted. Current value: {undefinedPosition.ToDisplayString()}"); + $"{nameof(LspFactory)}.{nameof(UndefinedPosition)} has been corrupted. Current value: {undefinedPosition.ToDisplayString()}"); return undefinedPosition; } @@ -93,7 +93,7 @@ public static Range UndefinedRange undefinedRange.Start.Character == -1 && undefinedRange.End.Line == -1 && undefinedRange.End.Character == -1, - $"{nameof(VsLspFactory)}.{nameof(UndefinedRange)} has been corrupted. Current value: {undefinedRange.ToDisplayString()}"); + $"{nameof(LspFactory)}.{nameof(UndefinedRange)} has been corrupted. Current value: {undefinedRange.ToDisplayString()}"); return undefinedRange; } diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentHighlight/RemoteDocumentHighlight.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentHighlight/RemoteDocumentHighlight.cs index c40741ebff5..d54f064a04a 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentHighlight/RemoteDocumentHighlight.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentHighlight/RemoteDocumentHighlight.cs @@ -4,7 +4,7 @@ using System.Runtime.Serialization; using Microsoft.CodeAnalysis.Text; using Microsoft.VisualStudio.LanguageServer.Protocol; -using static Roslyn.LanguageServer.Protocol.RoslynLspExtensions; +using static Roslyn.LanguageServer.Protocol.LspExtensions; using RoslynDocumentHighlight = Roslyn.LanguageServer.Protocol.DocumentHighlight; using VsDocumentHighlight = Microsoft.VisualStudio.LanguageServer.Protocol.DocumentHighlight; @@ -21,7 +21,7 @@ public static RemoteDocumentHighlight FromRoslynDocumentHighlight(RoslynDocument public static VsDocumentHighlight ToVsDocumentHighlight(RemoteDocumentHighlight highlight) => new() { - Range = VsLspExtensions.ToRange(highlight.Span), + Range = LspExtensions.ToRange(highlight.Span), Kind = highlight.Kind }; } diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/DocumentHighlight/RemoteDocumentHighlightService.cs b/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/DocumentHighlight/RemoteDocumentHighlightService.cs index 61252f6d011..f2d62ed9ed2 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/DocumentHighlight/RemoteDocumentHighlightService.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/DocumentHighlight/RemoteDocumentHighlightService.cs @@ -14,8 +14,8 @@ using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Remote.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Text; -using static Microsoft.VisualStudio.LanguageServer.Protocol.VsLspExtensions; -using static Roslyn.LanguageServer.Protocol.RoslynLspExtensions; +using static Microsoft.VisualStudio.LanguageServer.Protocol.LspExtensions; +using static Roslyn.LanguageServer.Protocol.LspExtensions; using Response = Microsoft.CodeAnalysis.Razor.Remote.RemoteResponse; namespace Microsoft.CodeAnalysis.Remote.Razor; @@ -80,7 +80,7 @@ private async ValueTask GetHighlightsAsync( { if (_documentMappingService.TryMapToHostDocumentRange(csharpDocument, highlight.Range.ToLinePositionSpan(), out var mappedRange)) { - highlight.Range = Roslyn.LanguageServer.Protocol.RoslynLspExtensions.ToRange(mappedRange); + highlight.Range = Roslyn.LanguageServer.Protocol.LspExtensions.ToRange(mappedRange); results.Add(RemoteDocumentHighlight.FromRoslynDocumentHighlight(highlight)); } } diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostSignatureHelpEndpoint.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostSignatureHelpEndpoint.cs index 1acfee411eb..030a6bec70c 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostSignatureHelpEndpoint.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostSignatureHelpEndpoint.cs @@ -17,8 +17,8 @@ using Microsoft.VisualStudio.Razor.LanguageClient.Cohost; using Microsoft.VisualStudio.Razor.LanguageClient.Extensions; using Microsoft.VisualStudio.Razor.Settings; -using static Roslyn.LanguageServer.Protocol.RoslynLspExtensions; -using RoslynLspFactory = Roslyn.LanguageServer.Protocol.RoslynLspFactory; +using static Roslyn.LanguageServer.Protocol.LspExtensions; +using LspFactory = Roslyn.LanguageServer.Protocol.LspFactory; using RoslynSignatureHelp = Roslyn.LanguageServer.Protocol.SignatureHelp; namespace Microsoft.VisualStudio.LanguageServices.Razor.LanguageClient.Cohost; @@ -86,7 +86,7 @@ internal class CohostSignatureHelpEndpoint( var data = await _remoteServiceInvoker.TryInvokeAsync( razorDocument.Project.Solution, (service, solutionInfo, cancellationToken) => - service.GetSignatureHelpAsync(solutionInfo, razorDocument.Id, RoslynLspFactory.CreatePosition(request.Position.ToLinePosition()), cancellationToken), + service.GetSignatureHelpAsync(solutionInfo, razorDocument.Id, LspFactory.CreatePosition(request.Position.ToLinePosition()), cancellationToken), cancellationToken) .ConfigureAwait(false); diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultRazorBreakpointResolver.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultRazorBreakpointResolver.cs index 84dd82b1dea..8025c56fb36 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultRazorBreakpointResolver.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultRazorBreakpointResolver.cs @@ -96,7 +96,7 @@ public DefaultRazorBreakpointResolver( return cachedRange; } - var position = VsLspFactory.CreatePosition(lineIndex, characterIndex); + var position = LspFactory.CreatePosition(lineIndex, characterIndex); var hostDocumentRange = await _breakpointSpanProvider.GetBreakpointSpanAsync(documentSnapshot, position, cancellationToken).ConfigureAwait(false); if (hostDocumentRange is null) { diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultRazorProximityExpressionResolver.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultRazorProximityExpressionResolver.cs index 1b129fef497..e271c871aea 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultRazorProximityExpressionResolver.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultRazorProximityExpressionResolver.cs @@ -95,7 +95,7 @@ public DefaultRazorProximityExpressionResolver( return cachedExpressions; } - var position = VsLspFactory.CreatePosition(lineIndex, characterIndex); + var position = LspFactory.CreatePosition(lineIndex, characterIndex); var proximityExpressions = await _proximityExpressionsProvider.GetProximityExpressionsAsync(documentSnapshot, position, cancellationToken).ConfigureAwait(false); // Cache range so if we're asked again for this document/line/character we don't have to go async. diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_Completion.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_Completion.cs index 6f86ccd57dd..329f5b82375 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_Completion.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_Completion.cs @@ -187,8 +187,8 @@ private static TextEdit BuildRevertedEdit(TextEdit provisionalTextEdit) if (range.Start == range.End) { // Insertion - revertedProvisionalTextEdit = VsLspFactory.CreateTextEdit( - range: VsLspFactory.CreateSingleLineRange( + revertedProvisionalTextEdit = LspFactory.CreateTextEdit( + range: LspFactory.CreateSingleLineRange( range.Start, length: range.End.Character + provisionalTextEdit.NewText.Length), newText: string.Empty); @@ -196,7 +196,7 @@ private static TextEdit BuildRevertedEdit(TextEdit provisionalTextEdit) else { // Replace - revertedProvisionalTextEdit = VsLspFactory.CreateTextEdit(range, string.Empty); + revertedProvisionalTextEdit = LspFactory.CreateTextEdit(range, string.Empty); } return revertedProvisionalTextEdit; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/AutoInsert/OnAutoInsertEndpointTest.NetFx.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/AutoInsert/OnAutoInsertEndpointTest.NetFx.cs index 7f7e31e9747..6ae6e6bdb80 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/AutoInsert/OnAutoInsertEndpointTest.NetFx.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/AutoInsert/OnAutoInsertEndpointTest.NetFx.cs @@ -31,7 +31,7 @@ public async Task Handle_SingleProvider_InvokesProvider() var @params = new VSInternalDocumentOnAutoInsertParams() { TextDocument = new TextDocumentIdentifier { Uri = uri, }, - Position = VsLspFactory.DefaultPosition, + Position = LspFactory.DefaultPosition, Character = ">", Options = new FormattingOptions { @@ -62,18 +62,18 @@ public async Task Handle_MultipleProviderSameTrigger_UsesSuccessful() var optionsMonitor = GetOptionsMonitor(); var insertProvider1 = new TestOnAutoInsertProvider(">", canResolve: false) { - ResolvedTextEdit = VsLspFactory.CreateTextEdit(position: (0, 0), string.Empty) + ResolvedTextEdit = LspFactory.CreateTextEdit(position: (0, 0), string.Empty) }; var insertProvider2 = new TestOnAutoInsertProvider(">", canResolve: true) { - ResolvedTextEdit = VsLspFactory.CreateTextEdit(position: (0, 0), string.Empty) + ResolvedTextEdit = LspFactory.CreateTextEdit(position: (0, 0), string.Empty) }; var formattingService = await TestRazorFormattingService.CreateWithFullSupportAsync(LoggerFactory); var endpoint = new OnAutoInsertEndpoint(LanguageServerFeatureOptions, DocumentMappingService, languageServer, [insertProvider1, insertProvider2], optionsMonitor, TestAdhocWorkspaceFactory.Instance, formattingService, LoggerFactory); var @params = new VSInternalDocumentOnAutoInsertParams() { TextDocument = new TextDocumentIdentifier { Uri = uri, }, - Position = VsLspFactory.DefaultPosition, + Position = LspFactory.DefaultPosition, Character = ">", Options = new FormattingOptions { @@ -107,18 +107,18 @@ public async Task Handle_MultipleProviderSameTrigger_UsesFirstSuccessful() var optionsMonitor = GetOptionsMonitor(); var insertProvider1 = new TestOnAutoInsertProvider(">", canResolve: true) { - ResolvedTextEdit = VsLspFactory.CreateTextEdit(position: (0, 0), string.Empty) + ResolvedTextEdit = LspFactory.CreateTextEdit(position: (0, 0), string.Empty) }; var insertProvider2 = new TestOnAutoInsertProvider(">", canResolve: true) { - ResolvedTextEdit = VsLspFactory.CreateTextEdit(position: (0, 0), string.Empty) + ResolvedTextEdit = LspFactory.CreateTextEdit(position: (0, 0), string.Empty) }; var formattingService = await TestRazorFormattingService.CreateWithFullSupportAsync(LoggerFactory); var endpoint = new OnAutoInsertEndpoint(LanguageServerFeatureOptions, DocumentMappingService, languageServer, [insertProvider1, insertProvider2], optionsMonitor, TestAdhocWorkspaceFactory.Instance, formattingService, LoggerFactory); var @params = new VSInternalDocumentOnAutoInsertParams() { TextDocument = new TextDocumentIdentifier { Uri = uri, }, - Position = VsLspFactory.DefaultPosition, + Position = LspFactory.DefaultPosition, Character = ">", Options = new FormattingOptions { @@ -155,7 +155,7 @@ public async Task Handle_NoApplicableProvider_CallsProviderAndReturnsNull() var @params = new VSInternalDocumentOnAutoInsertParams() { TextDocument = new TextDocumentIdentifier { Uri = uri, }, - Position = VsLspFactory.DefaultPosition, + Position = LspFactory.DefaultPosition, Character = ">", Options = new FormattingOptions { @@ -190,7 +190,7 @@ public async Task Handle_OnTypeFormattingOff_Html_CallsLanguageServer() var @params = new VSInternalDocumentOnAutoInsertParams() { TextDocument = new TextDocumentIdentifier { Uri = uri, }, - Position = VsLspFactory.DefaultPosition, + Position = LspFactory.DefaultPosition, Character = "=", Options = new FormattingOptions { @@ -223,7 +223,7 @@ public async Task Handle_AutoInsertAttributeQuotesOff_Html_DoesNotCallLanguageSe var @params = new VSInternalDocumentOnAutoInsertParams() { TextDocument = new TextDocumentIdentifier { Uri = uri, }, - Position = VsLspFactory.DefaultPosition, + Position = LspFactory.DefaultPosition, Character = "=", Options = new FormattingOptions { diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/AutoInsert/OnAutoInsertEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/AutoInsert/OnAutoInsertEndpointTest.cs index 57a48de76b4..4e71963389a 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/AutoInsert/OnAutoInsertEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/AutoInsert/OnAutoInsertEndpointTest.cs @@ -31,7 +31,7 @@ public async Task Handle_MultipleProviderUnmatchingTrigger_ReturnsNull() var @params = new VSInternalDocumentOnAutoInsertParams() { TextDocument = new TextDocumentIdentifier { Uri = uri, }, - Position = VsLspFactory.DefaultPosition, + Position = LspFactory.DefaultPosition, Character = "!", Options = new FormattingOptions { @@ -66,7 +66,7 @@ public async Task Handle_DocumentNotFound_ReturnsNull() var @params = new VSInternalDocumentOnAutoInsertParams() { TextDocument = new TextDocumentIdentifier { Uri = uri, }, - Position = VsLspFactory.DefaultPosition, + Position = LspFactory.DefaultPosition, Character = ">", Options = new FormattingOptions { @@ -101,7 +101,7 @@ public async Task Handle_UnsupportedCodeDocument_ReturnsNull() var @params = new VSInternalDocumentOnAutoInsertParams() { TextDocument = new TextDocumentIdentifier { Uri = uri, }, - Position = VsLspFactory.DefaultPosition, + Position = LspFactory.DefaultPosition, Character = ">", Options = new FormattingOptions { @@ -135,7 +135,7 @@ public async Task Handle_OnTypeFormattingOff_CSharp_ReturnsNull() var @params = new VSInternalDocumentOnAutoInsertParams() { TextDocument = new TextDocumentIdentifier { Uri = uri, }, - Position = VsLspFactory.CreatePosition(1, 3), + Position = LspFactory.CreatePosition(1, 3), Character = "/", Options = new FormattingOptions { diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CSharp/DefaultCSharpCodeActionProviderTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CSharp/DefaultCSharpCodeActionProviderTest.cs index 335e5df5f48..2d9ca497c73 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CSharp/DefaultCSharpCodeActionProviderTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CSharp/DefaultCSharpCodeActionProviderTest.cs @@ -52,7 +52,7 @@ public async Task ProvideAsync_ValidCodeActions_ReturnsProvidedCodeAction() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -83,7 +83,7 @@ public async Task ProvideAsync_SupportsCodeActionResolveFalse_ValidCodeActions_R var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -111,7 +111,7 @@ public async Task ProvideAsync_FunctionsBlock_SingleLine_ValidCodeActions_Return var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -144,7 +144,7 @@ public async Task ProvideAsync_FunctionsBlock_OpenBraceSameLine_ValidCodeActions var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -178,7 +178,7 @@ public async Task ProvideAsync_FunctionsBlock_OpenBraceNextLine_ValidCodeActions var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -209,7 +209,7 @@ public async Task ProvideAsync_InvalidCodeActions_ReturnsNoCodeActions() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -246,7 +246,7 @@ public async Task ProvideAsync_InvalidCodeActions_ShowAllFeatureFlagOn_ReturnsCo var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -292,7 +292,7 @@ public async Task ProvideAsync_ImplicitExpression_ReturnsProvidedCodeAction() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CSharp/DefaultCSharpCodeActionResolverTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CSharp/DefaultCSharpCodeActionResolverTest.cs index 6062be141b2..2dc1288ab2b 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CSharp/DefaultCSharpCodeActionResolverTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CSharp/DefaultCSharpCodeActionResolverTest.cs @@ -33,13 +33,13 @@ public class DefaultCSharpCodeActionResolverTest(ITestOutputHelper testOutput) : DocumentChanges = new TextDocumentEdit[] { new() { - Edits = [VsLspFactory.CreateTextEdit(position: (0, 0), "Generated C# Based Edit")] + Edits = [LspFactory.CreateTextEdit(position: (0, 0), "Generated C# Based Edit")] } } } }; - private static readonly TextEdit[] s_defaultFormattedEdits = [VsLspFactory.CreateTextEdit(position: (0, 0), "Remapped & Formatted Edit")]; + private static readonly TextEdit[] s_defaultFormattedEdits = [LspFactory.CreateTextEdit(position: (0, 0), "Remapped & Formatted Edit")]; private static readonly CodeAction s_defaultUnresolvedCodeAction = new CodeAction() { @@ -105,11 +105,11 @@ public async Task ResolveAsync_MultipleDocumentChanges_ReturnsOriginalCodeAction { new TextDocumentEdit() { - Edits = [VsLspFactory.CreateTextEdit(position: (0, 0), "1. Generated C# Based Edit")] + Edits = [LspFactory.CreateTextEdit(position: (0, 0), "1. Generated C# Based Edit")] }, new TextDocumentEdit() { - Edits = [VsLspFactory.CreateTextEdit(position: (0, 0), "2. Generated C# Based Edit")] + Edits = [LspFactory.CreateTextEdit(position: (0, 0), "2. Generated C# Based Edit")] } } } diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CSharp/TypeAccessibilityCodeActionProviderTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CSharp/TypeAccessibilityCodeActionProviderTest.cs index 7c3c0afff5d..4432a1bf83e 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CSharp/TypeAccessibilityCodeActionProviderTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CSharp/TypeAccessibilityCodeActionProviderTest.cs @@ -34,7 +34,7 @@ public async Task Handle_MissingDiagnostics_ReturnsEmpty() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() { // Even though the DTO declares this as non-null, we want to make sure we behave @@ -71,7 +71,7 @@ public async Task Handle_InvalidDiagnostics_VSCode_ReturnsEmpty() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() { Diagnostics = new Diagnostic[] { @@ -126,7 +126,7 @@ public async Task Handle_EmptyCodeActions_ReturnsEmpty() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() { Diagnostics = new Diagnostic[] { @@ -166,7 +166,7 @@ public async Task Handle_ValidDiagnostic_ValidCodeAction_VSCode_ReturnsCodeActio var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() { Diagnostics = new Diagnostic[] { @@ -179,7 +179,7 @@ public async Task Handle_ValidDiagnostic_ValidCodeAction_VSCode_ReturnsCodeActio { Severity = DiagnosticSeverity.Error, Code = errorCode, - Range = VsLspFactory.CreateRange(0, 8, 0, 12) + Range = LspFactory.CreateRange(0, 8, 0, 12) }, new Diagnostic() { @@ -242,7 +242,7 @@ public async Task Handle_CodeActionInSingleLineDirective_VS_ReturnsOnlyUsingCode var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() { Diagnostics = Array.Empty() @@ -294,7 +294,7 @@ public async Task Handle_ValidCodeAction_VS_ReturnsCodeActions() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() { Diagnostics = Array.Empty() @@ -352,7 +352,7 @@ public async Task Handle_ValidDiagnostic_MultipleValidCodeActions_VSCode_Returns var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() { Diagnostics = new Diagnostic[] { @@ -365,7 +365,7 @@ public async Task Handle_ValidDiagnostic_MultipleValidCodeActions_VSCode_Returns { Severity = DiagnosticSeverity.Error, Code = "CS0246", - Range = VsLspFactory.CreateRange(0, 8, 0, 12) + Range = LspFactory.CreateRange(0, 8, 0, 12) }, new Diagnostic() { diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CodeActionEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CodeActionEndpointTest.cs index e5dc42a3fb7..76515aa9b92 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CodeActionEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CodeActionEndpointTest.cs @@ -72,7 +72,7 @@ public async Task Handle_NoDocument() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = documentPath }, - Range = VsLspFactory.CreateZeroWidthRange(0, 1), + Range = LspFactory.CreateZeroWidthRange(0, 1), Context = new VSInternalCodeActionContext() }; @@ -108,7 +108,7 @@ public async Task Handle_UnsupportedDocument() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = documentPath }, - Range = VsLspFactory.CreateZeroWidthRange(0, 1), + Range = LspFactory.CreateZeroWidthRange(0, 1), Context = new VSInternalCodeActionContext() }; var requestContext = CreateRazorRequestContext(documentContext); @@ -142,7 +142,7 @@ public async Task Handle_NoProviders() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = documentPath }, - Range = VsLspFactory.CreateZeroWidthRange(0, 1), + Range = LspFactory.CreateZeroWidthRange(0, 1), Context = new VSInternalCodeActionContext() }; var requestContext = CreateRazorRequestContext(documentContext); @@ -179,7 +179,7 @@ public async Task Handle_OneRazorCodeActionProvider() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = documentPath }, - Range = VsLspFactory.CreateZeroWidthRange(0, 1), + Range = LspFactory.CreateZeroWidthRange(0, 1), Context = new VSInternalCodeActionContext() }; var requestContext = CreateRazorRequestContext(documentContext); @@ -219,7 +219,7 @@ public async Task Handle_OneCSharpCodeActionProvider() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = documentPath }, - Range = VsLspFactory.CreateZeroWidthRange(0, 1), + Range = LspFactory.CreateZeroWidthRange(0, 1), Context = new VSInternalCodeActionContext() }; var requestContext = CreateRazorRequestContext(documentContext); @@ -257,7 +257,7 @@ public async Task Handle_OneCodeActionProviderWithMultipleCodeActions() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = documentPath }, - Range = VsLspFactory.CreateZeroWidthRange(0, 1), + Range = LspFactory.CreateZeroWidthRange(0, 1), Context = new VSInternalCodeActionContext() }; var requestContext = CreateRazorRequestContext(documentContext); @@ -302,7 +302,7 @@ public async Task Handle_MultipleCodeActionProvidersWithMultipleCodeActions() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = documentPath }, - Range = VsLspFactory.CreateZeroWidthRange(0, 1), + Range = LspFactory.CreateZeroWidthRange(0, 1), Context = new VSInternalCodeActionContext() }; var requestContext = CreateRazorRequestContext(documentContext); @@ -347,7 +347,7 @@ public async Task Handle_MultipleProviders() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = documentPath }, - Range = VsLspFactory.CreateZeroWidthRange(0, 1), + Range = LspFactory.CreateZeroWidthRange(0, 1), Context = new VSInternalCodeActionContext() }; var requestContext = CreateRazorRequestContext(documentContext); @@ -385,7 +385,7 @@ public async Task Handle_OneNullReturningProvider() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = documentPath }, - Range = VsLspFactory.CreateZeroWidthRange(0, 1), + Range = LspFactory.CreateZeroWidthRange(0, 1), Context = new VSInternalCodeActionContext() }; var requestContext = CreateRazorRequestContext(documentContext); @@ -430,7 +430,7 @@ public async Task Handle_MultipleMixedProvider() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = documentPath }, - Range = VsLspFactory.CreateZeroWidthRange(0, 1), + Range = LspFactory.CreateZeroWidthRange(0, 1), Context = new VSInternalCodeActionContext() }; var requestContext = CreateRazorRequestContext(documentContext); @@ -470,7 +470,7 @@ public async Task Handle_MultipleMixedProvider_SupportsCodeActionResolveTrue() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = documentPath }, - Range = VsLspFactory.CreateZeroWidthRange(0, 1), + Range = LspFactory.CreateZeroWidthRange(0, 1), Context = new VSInternalCodeActionContext() }; var requestContext = CreateRazorRequestContext(documentContext); @@ -522,7 +522,7 @@ public async Task Handle_MixedProvider_SupportsCodeActionResolveTrue_UsesGroups( var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = documentPath }, - Range = VsLspFactory.CreateZeroWidthRange(0, 1), + Range = LspFactory.CreateZeroWidthRange(0, 1), Context = new VSInternalCodeActionContext() }; var requestContext = CreateRazorRequestContext(documentContext); @@ -574,7 +574,7 @@ public async Task Handle_MultipleMixedProvider_SupportsCodeActionResolveFalse() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = documentPath }, - Range = VsLspFactory.CreateZeroWidthRange(0, 1), + Range = LspFactory.CreateZeroWidthRange(0, 1), Context = new VSInternalCodeActionContext() }; var requestContext = CreateRazorRequestContext(documentContext); @@ -619,8 +619,8 @@ public async Task GenerateRazorCodeActionContextAsync_WithSelectionRange() _supportsCodeActionResolve = false }; - var initialRange = VsLspFactory.CreateZeroWidthRange(0, 1); - var selectionRange = VsLspFactory.CreateZeroWidthRange(0, 5); + var initialRange = LspFactory.CreateZeroWidthRange(0, 1); + var selectionRange = LspFactory.CreateZeroWidthRange(0, 5); var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = documentPath }, @@ -661,7 +661,7 @@ public async Task GenerateRazorCodeActionContextAsync_WithoutSelectionRange() _supportsCodeActionResolve = false }; - var initialRange = VsLspFactory.CreateZeroWidthRange(0, 1); + var initialRange = LspFactory.CreateZeroWidthRange(0, 1); var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = documentPath }, @@ -706,7 +706,7 @@ public async Task GetCSharpCodeActionsFromLanguageServerAsync_InvalidRangeMappin _supportsCodeActionResolve = false }; - var initialRange = VsLspFactory.CreateZeroWidthRange(0, 1); + var initialRange = LspFactory.CreateZeroWidthRange(0, 1); var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = documentPath }, @@ -732,7 +732,7 @@ public async Task GetCSharpCodeActionsFromLanguageServerAsync_ReturnsCodeActions var documentPath = new Uri("C:/path/to/Page.razor"); var codeDocument = CreateCodeDocument("@code {}"); var documentContext = CreateDocumentContext(documentPath, codeDocument); - var projectedRange = VsLspFactory.CreateZeroWidthRange(15, 2); + var projectedRange = LspFactory.CreateZeroWidthRange(15, 2); var documentMappingService = CreateDocumentMappingService(projectedRange.ToLinePositionSpan()); var languageServer = CreateLanguageServer(); var codeActionEndpoint = new CodeActionEndpoint( @@ -750,7 +750,7 @@ public async Task GetCSharpCodeActionsFromLanguageServerAsync_ReturnsCodeActions _supportsCodeActionResolve = false }; - var initialRange = VsLspFactory.CreateZeroWidthRange(0, 1); + var initialRange = LspFactory.CreateZeroWidthRange(0, 1); var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = documentPath }, diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Html/DefaultHtmlCodeActionProviderTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Html/DefaultHtmlCodeActionProviderTest.cs index 5104d53b0fa..8c21b56f374 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Html/DefaultHtmlCodeActionProviderTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Html/DefaultHtmlCodeActionProviderTest.cs @@ -34,7 +34,7 @@ public async Task ProvideAsync_WrapsResolvableCodeActions() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -67,7 +67,7 @@ public async Task ProvideAsync_RemapsAndFixesEdits() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -85,7 +85,7 @@ public async Task ProvideAsync_RemapsAndFixesEdits() Uri = new Uri(documentPath), Version = 1 }, - Edits = [VsLspFactory.CreateTextEdit(context.SourceText.GetRange(span), "Goo ~~~~~~~~~~~~~~~ Bar")] + Edits = [LspFactory.CreateTextEdit(context.SourceText.GetRange(span), "Goo ~~~~~~~~~~~~~~~ Bar")] } } }; @@ -112,7 +112,7 @@ public async Task ProvideAsync_RemapsAndFixesEdits() Uri = new Uri("c:/Test.razor.html"), Version = 1 }, - Edits = [VsLspFactory.CreateTextEdit(position: (0, 0), "Goo")] + Edits = [LspFactory.CreateTextEdit(position: (0, 0), "Goo")] } } } diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Html/DefaultHtmlCodeActionResolverTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Html/DefaultHtmlCodeActionResolverTest.cs index 5d7704aa426..2d7d9b67d38 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Html/DefaultHtmlCodeActionResolverTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Html/DefaultHtmlCodeActionResolverTest.cs @@ -46,7 +46,7 @@ public async Task ResolveAsync_RemapsAndFixesEdits() Uri = documentUri, Version = 1 }, - Edits = [VsLspFactory.CreateTextEdit(sourceText.GetRange(span), "Goo ~~~~~~~~~~~~~~~ Bar")] + Edits = [LspFactory.CreateTextEdit(sourceText.GetRange(span), "Goo ~~~~~~~~~~~~~~~ Bar")] } } }; @@ -77,7 +77,7 @@ public async Task ResolveAsync_RemapsAndFixesEdits() Uri = new Uri("c:/Test.razor.html"), Version = 1 }, - Edits = [VsLspFactory.CreateTextEdit(position: (0, 0), "Goo")] + Edits = [LspFactory.CreateTextEdit(position: (0, 0), "Goo")] } } } diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Razor/ComponentAccessibilityCodeActionProviderTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Razor/ComponentAccessibilityCodeActionProviderTest.cs index 7d4ca269ff6..cc0f250405f 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Razor/ComponentAccessibilityCodeActionProviderTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Razor/ComponentAccessibilityCodeActionProviderTest.cs @@ -35,7 +35,7 @@ public async Task Handle_NoTagName_DoesNotProvideLightBulb() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.CreateZeroWidthRange(0, 1), + Range = LspFactory.CreateZeroWidthRange(0, 1), Context = new VSInternalCodeActionContext() }; @@ -64,7 +64,7 @@ public async Task Handle_InvalidSyntaxTree_NoStartNode() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -94,7 +94,7 @@ public async Task Handle_CursorOutsideComponent() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -123,7 +123,7 @@ public async Task Handle_ExistingComponent_SupportsFileCreationTrue_ReturnsResul var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -171,7 +171,7 @@ public async Task Handle_ExistingComponent_CaseIncorrect_ReturnsResults() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -221,7 +221,7 @@ @using Fully.Qualified var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -263,7 +263,7 @@ public async Task Handle_ExistingGenericComponent_SupportsFileCreationTrue_Retur var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -311,7 +311,7 @@ public async Task Handle_NewComponent_SupportsFileCreationTrue_ReturnsResult() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -342,7 +342,7 @@ public async Task Handle_NewComponent_CaretInAttribute_ReturnsResult() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -373,7 +373,7 @@ public async Task Handle_NewComponent_SupportsFileCreationFalse_ReturnsEmpty() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -402,7 +402,7 @@ public async Task Handle_ExistingComponent_SupportsFileCreationFalse_ReturnsResu var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Razor/ExtractToCodeBehindCodeActionProviderTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Razor/ExtractToCodeBehindCodeActionProviderTest.cs index a0995f885a9..61c8fb4efed 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Razor/ExtractToCodeBehindCodeActionProviderTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Razor/ExtractToCodeBehindCodeActionProviderTest.cs @@ -38,7 +38,7 @@ public async Task Handle_InvalidFileKind() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -69,7 +69,7 @@ public async Task Handle_OutsideCodeDirective() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -99,7 +99,7 @@ public async Task Handle_InCodeDirectiveBlock_ReturnsNull() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -129,7 +129,7 @@ public async Task Handle_InCodeDirectiveMalformed_ReturnsNull() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -164,7 +164,7 @@ void Test() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -205,7 +205,7 @@ public async Task Handle_InCodeDirective_SupportsFileCreationTrue_ReturnsResult( var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -248,7 +248,7 @@ public async Task Handle_AtEndOfCodeDirectiveWithNoSpace_ReturnsResult() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -285,7 +285,7 @@ public async Task Handle_InCodeDirective_SupportsFileCreationFalse_ReturnsNull() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -321,7 +321,7 @@ public async Task Handle_InFunctionsDirective_SupportsFileCreationTrue_ReturnsRe var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() }; @@ -358,7 +358,7 @@ public async Task Handle_NullRelativePath_ReturnsNull() var request = new VSCodeActionParams() { TextDocument = new VSTextDocumentIdentifier { Uri = new Uri(documentPath) }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = null! }; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/DelegatedCompletionItemResolverTest.NetFx.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/DelegatedCompletionItemResolverTest.NetFx.cs index b39900715b0..a1f9ba82ff2 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/DelegatedCompletionItemResolverTest.NetFx.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/DelegatedCompletionItemResolverTest.NetFx.cs @@ -52,8 +52,8 @@ public DelegatedCompletionItemResolverTest(ITestOutputHelper testOutput) }; var documentContext = TestDocumentContext.From("C:/path/to/file.cshtml", hostDocumentVersion: 0); - _csharpCompletionParams = new DelegatedCompletionParams(documentContext.Identifier, VsLspFactory.CreatePosition(10, 6), RazorLanguageKind.CSharp, new VSInternalCompletionContext(), ProvisionalTextEdit: null, ShouldIncludeSnippets: false, CorrelationId: Guid.Empty); - _htmlCompletionParams = new DelegatedCompletionParams(documentContext.Identifier, VsLspFactory.DefaultPosition, RazorLanguageKind.Html, new VSInternalCompletionContext(), ProvisionalTextEdit: null, ShouldIncludeSnippets: false, CorrelationId: Guid.Empty); + _csharpCompletionParams = new DelegatedCompletionParams(documentContext.Identifier, LspFactory.CreatePosition(10, 6), RazorLanguageKind.CSharp, new VSInternalCompletionContext(), ProvisionalTextEdit: null, ShouldIncludeSnippets: false, CorrelationId: Guid.Empty); + _htmlCompletionParams = new DelegatedCompletionParams(documentContext.Identifier, LspFactory.DefaultPosition, RazorLanguageKind.Html, new VSInternalCompletionContext(), ProvisionalTextEdit: null, ShouldIncludeSnippets: false, CorrelationId: Guid.Empty); _documentContextFactory = new TestDocumentContextFactory(); _formattingService = new AsyncLazy(() => TestRazorFormattingService.CreateWithFullSupportAsync(LoggerFactory)); } diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/DelegatedCompletionListProviderTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/DelegatedCompletionListProviderTest.cs index cc82c40eb4d..d51767f48ad 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/DelegatedCompletionListProviderTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/DelegatedCompletionListProviderTest.cs @@ -71,7 +71,7 @@ await _provider.GetCompletionListAsync( var delegatedParameters = _provider.DelegatedParams; Assert.NotNull(delegatedParameters); Assert.Equal(RazorLanguageKind.Html, delegatedParameters.ProjectedKind); - Assert.Equal(VsLspFactory.CreatePosition(0, 1), delegatedParameters.ProjectedPosition); + Assert.Equal(LspFactory.CreatePosition(0, 1), delegatedParameters.ProjectedPosition); Assert.Equal(CompletionTriggerKind.Invoked, delegatedParameters.Context.TriggerKind); Assert.Equal(1337, delegatedParameters.Identifier.Version); Assert.Null(delegatedParameters.ProvisionalTextEdit); @@ -98,7 +98,7 @@ await _provider.GetCompletionListAsync( var delegatedParameters = _provider.DelegatedParams; Assert.NotNull(delegatedParameters); Assert.Equal(RazorLanguageKind.Html, delegatedParameters.ProjectedKind); - Assert.Equal(VsLspFactory.CreatePosition(0, 1), delegatedParameters.ProjectedPosition); + Assert.Equal(LspFactory.CreatePosition(0, 1), delegatedParameters.ProjectedPosition); Assert.Equal(CompletionTriggerKind.TriggerCharacter, delegatedParameters.Context.TriggerKind); Assert.Equal(VSInternalCompletionInvokeKind.Typing, delegatedParameters.Context.InvokeKind); Assert.Equal(1337, delegatedParameters.Identifier.Version); @@ -126,7 +126,7 @@ await _provider.GetCompletionListAsync( var delegatedParameters = _provider.DelegatedParams; Assert.NotNull(delegatedParameters); Assert.Equal(RazorLanguageKind.Html, delegatedParameters.ProjectedKind); - Assert.Equal(VsLspFactory.CreatePosition(0, 1), delegatedParameters.ProjectedPosition); + Assert.Equal(LspFactory.CreatePosition(0, 1), delegatedParameters.ProjectedPosition); Assert.Equal(CompletionTriggerKind.Invoked, delegatedParameters.Context.TriggerKind); Assert.Equal(VSInternalCompletionInvokeKind.Typing, delegatedParameters.Context.InvokeKind); Assert.Equal(1337, delegatedParameters.Identifier.Version); diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/TextEditResponseRewriterTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/TextEditResponseRewriterTest.cs index 38115319260..2696cfe185b 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/TextEditResponseRewriterTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/TextEditResponseRewriterTest.cs @@ -19,7 +19,7 @@ public async Task RewriteAsync_NotCSharp_Noops() // Arrange var getCompletionsAt = 1; var documentContent = "<"; - var textEditRange = VsLspFactory.CreateSingleLineRange(start: (0, 0), length: 1); + var textEditRange = LspFactory.CreateSingleLineRange(start: (0, 0), length: 1); var delegatedCompletionList = GenerateCompletionList(textEditRange); // Act @@ -37,9 +37,9 @@ public async Task RewriteAsync_CSharp_AdjustsItemRange() var getCompletionsAt = 1; var documentContent = "@DateTime"; // Line 19: __o = DateTime - var textEditRange = VsLspFactory.CreateSingleLineRange(line: 19, character: 6, length: 8); + var textEditRange = LspFactory.CreateSingleLineRange(line: 19, character: 6, length: 8); var delegatedCompletionList = GenerateCompletionList(textEditRange); - var expectedRange = VsLspFactory.CreateSingleLineRange(line: 0, character: 1, length: 8); + var expectedRange = LspFactory.CreateSingleLineRange(line: 0, character: 1, length: 8); // Act var rewrittenCompletionList = await GetRewrittenCompletionListAsync( @@ -56,13 +56,13 @@ public async Task RewriteAsync_CSharp_AdjustsListRange() var getCompletionsAt = 1; var documentContent = "@DateTime"; // Line 19: __o = DateTime - var textEditRange = VsLspFactory.CreateSingleLineRange(line: 19, character: 6, length: 8); + var textEditRange = LspFactory.CreateSingleLineRange(line: 19, character: 6, length: 8); var delegatedCompletionList = GenerateCompletionList(textEditRange); delegatedCompletionList.ItemDefaults = new CompletionListItemDefaults() { EditRange = textEditRange, }; - var expectedRange = VsLspFactory.CreateSingleLineRange(line: 0, character: 1, length: 8); + var expectedRange = LspFactory.CreateSingleLineRange(line: 0, character: 1, length: 8); // Act var rewrittenCompletionList = await GetRewrittenCompletionListAsync( @@ -79,7 +79,7 @@ private static VSInternalCompletionList GenerateCompletionList(Range textEditRan Items = [ new VSInternalCompletionItem() { - TextEdit = VsLspFactory.CreateTextEdit(textEditRange, "Hello") + TextEdit = LspFactory.CreateTextEdit(textEditRange, "Hello") } ] }; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/RazorCompletionEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/RazorCompletionEndpointTest.cs index 4809ad880ae..f145c1ca53e 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/RazorCompletionEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/RazorCompletionEndpointTest.cs @@ -28,7 +28,7 @@ public async Task Handle_NoDocumentContext_NoCompletionItems() { Uri = new Uri(documentPath) }, - Position = VsLspFactory.CreatePosition(0, 1), + Position = LspFactory.CreatePosition(0, 1), Context = new VSInternalCompletionContext(), }; var requestContext = CreateRazorRequestContext(documentContext: null); @@ -56,7 +56,7 @@ public async Task Handle_AutoShowCompletionDisabled_NoCompletionItems() { Uri = uri }, - Position = VsLspFactory.CreatePosition(0, 1), + Position = LspFactory.CreatePosition(0, 1), Context = new VSInternalCompletionContext() { InvokeKind = VSInternalCompletionInvokeKind.Typing }, }; var requestContext = CreateRazorRequestContext(documentContext); diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Debugging/RazorBreakpointSpanEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Debugging/RazorBreakpointSpanEndpointTest.cs index bfae068bda8..d2c5921b3c9 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Debugging/RazorBreakpointSpanEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Debugging/RazorBreakpointSpanEndpointTest.cs @@ -39,7 +39,7 @@ public async Task Handle_UnsupportedDocument_ReturnsNull() var request = new RazorBreakpointSpanParams() { Uri = documentPath, - Position = VsLspFactory.CreatePosition(1, 0) + Position = LspFactory.CreatePosition(1, 0) }; codeDocument.SetUnsupported(); var requestContext = CreateRazorRequestContext(documentContext); @@ -64,9 +64,9 @@ public async Task Handle_StartsInHtml_BreakpointMoved() var request = new RazorBreakpointSpanParams() { Uri = documentPath, - Position = VsLspFactory.CreatePosition(1, 0) + Position = LspFactory.CreatePosition(1, 0) }; - var expectedRange = VsLspFactory.CreateSingleLineRange(line: 1, character: 5, length: 14); + var expectedRange = LspFactory.CreateSingleLineRange(line: 1, character: 5, length: 14); var requestContext = CreateRazorRequestContext(documentContext); // Act @@ -89,9 +89,9 @@ public async Task Handle_ImplicitExpression_StartsInHtml_BreakpointMoved() var request = new RazorBreakpointSpanParams() { Uri = documentPath, - Position = VsLspFactory.CreatePosition(1, 0) + Position = LspFactory.CreatePosition(1, 0) }; - var expectedRange = VsLspFactory.CreateSingleLineRange(line: 1, character: 4, length: 12); + var expectedRange = LspFactory.CreateSingleLineRange(line: 1, character: 4, length: 12); var requestContext = CreateRazorRequestContext(documentContext); // Act @@ -114,9 +114,9 @@ public async Task Handle_StartsInHtml_BreakpointMoved_Razor() var request = new RazorBreakpointSpanParams() { Uri = documentPath, - Position = VsLspFactory.CreatePosition(1, 0) + Position = LspFactory.CreatePosition(1, 0) }; - var expectedRange = VsLspFactory.CreateSingleLineRange(line: 1, character: 5, length: 14); + var expectedRange = LspFactory.CreateSingleLineRange(line: 1, character: 5, length: 14); var requestContext = CreateRazorRequestContext(documentContext); // Act @@ -139,9 +139,9 @@ public async Task Handle_ImplicitExpression_StartsInHtml_BreakpointMoved_Razor() var request = new RazorBreakpointSpanParams() { Uri = documentPath, - Position = VsLspFactory.CreatePosition(1, 0) + Position = LspFactory.CreatePosition(1, 0) }; - var expectedRange = VsLspFactory.CreateSingleLineRange(line: 1, character: 4, length: 12); + var expectedRange = LspFactory.CreateSingleLineRange(line: 1, character: 4, length: 12); var requestContext = CreateRazorRequestContext(documentContext); // Act @@ -165,7 +165,7 @@ public async Task Handle_StartsInHtml_InvalidBreakpointSpan_ReturnsNull() var request = new RazorBreakpointSpanParams() { Uri = documentPath, - Position = VsLspFactory.CreatePosition(1, 0) + Position = LspFactory.CreatePosition(1, 0) }; var requestContext = CreateRazorRequestContext(documentContext); @@ -189,7 +189,7 @@ public async Task Handle_StartInHtml_NoCSharpOnLine_ReturnsNull() var request = new RazorBreakpointSpanParams() { Uri = documentPath, - Position = VsLspFactory.CreatePosition(1, 0) + Position = LspFactory.CreatePosition(1, 0) }; var requestContext = CreateRazorRequestContext(documentContext); @@ -216,7 +216,7 @@ public async Task Handle_StartInHtml_NoActualCSharp_ReturnsNull() var request = new RazorBreakpointSpanParams() { Uri = documentPath, - Position = VsLspFactory.CreatePosition(1, 0) + Position = LspFactory.CreatePosition(1, 0) }; var requestContext = CreateRazorRequestContext(documentContext); @@ -243,7 +243,7 @@ public async Task Handle_InvalidBreakpointSpan_ReturnsNull() var request = new RazorBreakpointSpanParams() { Uri = documentPath, - Position = VsLspFactory.CreatePosition(2, 0) + Position = LspFactory.CreatePosition(2, 0) }; var requestContext = CreateRazorRequestContext(documentContext); diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Debugging/RazorProximityExpressionsEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Debugging/RazorProximityExpressionsEndpointTest.cs index e8bfb086782..3cd6acb4f6b 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Debugging/RazorProximityExpressionsEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Debugging/RazorProximityExpressionsEndpointTest.cs @@ -39,7 +39,7 @@ public async Task Handle_UnsupportedDocument_ReturnsNull() var request = new RazorProximityExpressionsParams() { Uri = documentPath, - Position = VsLspFactory.CreatePosition(1, 0), + Position = LspFactory.CreatePosition(1, 0), }; codeDocument.SetUnsupported(); var requestContext = CreateRazorRequestContext(documentContext); @@ -64,7 +64,7 @@ public async Task Handle_ReturnsValidExpressions() var request = new RazorProximityExpressionsParams() { Uri = documentPath, - Position = VsLspFactory.CreatePosition(1, 8), + Position = LspFactory.CreatePosition(1, 8), }; var requestContext = CreateRazorRequestContext(documentContext); @@ -89,7 +89,7 @@ public async Task Handle_StartsInHtml_ReturnsValidExpressions() var request = new RazorProximityExpressionsParams() { Uri = documentPath, - Position = VsLspFactory.CreatePosition(1, 0), + Position = LspFactory.CreatePosition(1, 0), }; var requestContext = CreateRazorRequestContext(documentContext); @@ -114,7 +114,7 @@ public async Task Handle_StartInHtml_NoCSharpOnLine_ReturnsNull() var request = new RazorProximityExpressionsParams() { Uri = documentPath, - Position = VsLspFactory.CreatePosition(1, 0), + Position = LspFactory.CreatePosition(1, 0), }; var requestContext = CreateRazorRequestContext(documentContext); @@ -141,7 +141,7 @@ public async Task Handle_InvalidLocation_ReturnsNull() var request = new RazorProximityExpressionsParams() { Uri = documentPath, - Position = VsLspFactory.DefaultPosition, + Position = LspFactory.DefaultPosition, }; var requestContext = CreateRazorRequestContext(documentContext); diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/RazorDiagnosticConverterTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/RazorDiagnosticConverterTest.cs index 4e670005541..0b40950b057 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/RazorDiagnosticConverterTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/RazorDiagnosticConverterTest.cs @@ -64,7 +64,7 @@ public void ConvertSpanToRange_ReturnsConvertedRange() // Arrange var sourceSpan = new SourceSpan(3, 0, 3, 4); var sourceText = SourceText.From("Hello World"); - var expectedRange = VsLspFactory.CreateSingleLineRange(line: 0, character: 3, length: 4); + var expectedRange = LspFactory.CreateSingleLineRange(line: 0, character: 3, length: 4); // Act var range = RazorDiagnosticConverter.ConvertSpanToRange(sourceSpan, sourceText); @@ -80,7 +80,7 @@ public void ConvertSpanToRange_StartsOutsideOfDocument_EmptyDocument_NormalizesT // Arrange var sourceText = SourceText.From(string.Empty); var sourceSpan = new SourceSpan(5, 0, 5, 4); - var expectedRange = VsLspFactory.DefaultRange; + var expectedRange = LspFactory.DefaultRange; // Act var range = RazorDiagnosticConverter.ConvertSpanToRange(sourceSpan, sourceText); @@ -96,7 +96,7 @@ public void ConvertSpanToRange_StartsOutsideOfDocument_NormalizesToEnd() // Arrange var sourceText = SourceText.From("Hello World"); var sourceSpan = new SourceSpan(sourceText.Length + 5, 0, sourceText.Length + 5, 4); - var expectedRange = VsLspFactory.CreateZeroWidthRange(0, 11); + var expectedRange = LspFactory.CreateZeroWidthRange(0, 11); // Act var range = RazorDiagnosticConverter.ConvertSpanToRange(sourceSpan, sourceText); @@ -112,7 +112,7 @@ public void ConvertSpanToRange_EndsOutsideOfDocument_NormalizesToEnd() // Arrange var sourceText = SourceText.From("Hello World"); var sourceSpan = new SourceSpan(6, 0, 6, 15); - var expectedRange = VsLspFactory.CreateSingleLineRange(line: 0, character: 6, length: 5); + var expectedRange = LspFactory.CreateSingleLineRange(line: 0, character: 6, length: 5); // Act var range = RazorDiagnosticConverter.ConvertSpanToRange(sourceSpan, sourceText); diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/RazorDiagnosticsPublisherTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/RazorDiagnosticsPublisherTest.cs index e5910df49ec..543e90e278b 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/RazorDiagnosticsPublisherTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/RazorDiagnosticsPublisherTest.cs @@ -42,7 +42,7 @@ public class RazorDiagnosticsPublisherTest(ITestOutputHelper testOutput) : Langu Code = "TestCode", Severity = DiagnosticSeverity.Error, Message = "TestMessage", - Range = VsLspFactory.CreateSingleLineRange(line: 0, character: 0, length: 1) + Range = LspFactory.CreateSingleLineRange(line: 0, character: 0, length: 1) } ]; @@ -155,7 +155,7 @@ public async Task PublishDiagnosticsAsync_NewDocumentDiagnosticsGetPublished(boo Code = "TestCode", Severity = DiagnosticSeverity.Error, Message = "TestMessage", - Range = VsLspFactory.CreateSingleLineRange(line: 0, character: 0, length: 1) + Range = LspFactory.CreateSingleLineRange(line: 0, character: 0, length: 1) } }; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentPresentation/TextDocumentTextPresentationEndpointTests.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentPresentation/TextDocumentTextPresentationEndpointTests.cs index f5af246e6e4..a2072787e14 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentPresentation/TextDocumentTextPresentationEndpointTests.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentPresentation/TextDocumentTextPresentationEndpointTests.cs @@ -51,7 +51,7 @@ public async Task Handle_Html_MakesRequest() { Uri = uri }, - Range = VsLspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1), + Range = LspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1), Text = "Hi there" }; var requestContext = CreateRazorRequestContext(documentContext); @@ -90,7 +90,7 @@ public async Task Handle_CSharp_DoesNotMakeRequest() { Uri = uri }, - Range = VsLspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1), + Range = LspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1), Text = "Hi there" }; var requestContext = CreateRazorRequestContext(documentContext); @@ -131,7 +131,7 @@ public async Task Handle_DocumentNotFound_ReturnsNull() { Uri = uri }, - Range = VsLspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1), + Range = LspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1), Text = "Hi there" }; var requestContext = CreateRazorRequestContext(documentContext); @@ -173,7 +173,7 @@ public async Task Handle_UnsupportedCodeDocument_ReturnsNull() { Uri = uri }, - Range = VsLspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1), + Range = LspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1), Text = "Hi there" }; var requestContext = CreateRazorRequestContext(documentContext); diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentPresentation/TextDocumentUriPresentationEndpointTests.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentPresentation/TextDocumentUriPresentationEndpointTests.cs index 3e0c2fecef4..30df2ebf408 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentPresentation/TextDocumentUriPresentationEndpointTests.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentPresentation/TextDocumentUriPresentationEndpointTests.cs @@ -69,7 +69,7 @@ public async Task Handle_SimpleComponent_ReturnsResult() { Uri = uri }, - Range = VsLspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1), + Range = LspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1), Uris = [droppedUri] }; var requestContext = CreateRazorRequestContext(documentContext); @@ -127,7 +127,7 @@ public async Task Handle_SimpleComponentWithChildFile_ReturnsResult() { Uri = uri }, - Range = VsLspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1), + Range = LspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1), Uris = [ new Uri("file:///c:/path/MyTagHelper.razor.cs"), @@ -196,7 +196,7 @@ public async Task Handle_ComponentWithRequiredAttribute_ReturnsResult() { Uri = uri }, - Range = VsLspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1), + Range = LspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1), Uris = [droppedUri] }; var requestContext = CreateRazorRequestContext(documentContext); @@ -248,7 +248,7 @@ public async Task Handle_NoTypeNameIdentifier_ReturnsNull() { Uri = uri }, - Range = VsLspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1), + Range = LspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1), Uris = [droppedUri] }; var requestContext = CreateRazorRequestContext(documentContext); @@ -294,7 +294,7 @@ public async Task Handle_MultipleUris_ReturnsNull() { Uri = uri }, - Range = VsLspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1), + Range = LspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1), Uris = [ new Uri("file:///c:/path/SomeOtherFile.cs"), @@ -346,7 +346,7 @@ public async Task Handle_NotComponent_ReturnsNull() { Uri = uri }, - Range = VsLspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1), + Range = LspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1), Uris = [droppedUri] }; var requestContext = CreateRazorRequestContext(documentContext); @@ -404,7 +404,7 @@ public async Task Handle_ComponentWithNestedFiles_ReturnsResult() { Uri = uri }, - Range = VsLspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1), + Range = LspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1), Uris = [droppedUri1, droppedUri2] }; var requestContext = CreateRazorRequestContext(documentContext); @@ -453,7 +453,7 @@ public async Task Handle_CSharp_ReturnsNull() { Uri = uri }, - Range = VsLspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1) + Range = LspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1) }; var requestContext = CreateRazorRequestContext(documentContext); @@ -497,7 +497,7 @@ public async Task Handle_DocumentNotFound_ReturnsNull() { Uri = uri }, - Range = VsLspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1) + Range = LspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1) }; var requestContext = CreateRazorRequestContext(documentContext); @@ -542,7 +542,7 @@ public async Task Handle_UnsupportedCodeDocument_ReturnsNull() { Uri = uri }, - Range = VsLspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1) + Range = LspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1) }; var requestContext = CreateRazorRequestContext(documentContext); @@ -586,7 +586,7 @@ public async Task Handle_NoUris_ReturnsNull() { Uri = uri }, - Range = VsLspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1) + Range = LspFactory.CreateSingleLineRange(line: 0, character: 1, length: 1) }; var requestContext = CreateRazorRequestContext(documentContext); diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentSynchronization/DocumentDidChangeEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentSynchronization/DocumentDidChangeEndpointTest.cs index baf947911fb..b80ba2f8b69 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentSynchronization/DocumentDidChangeEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentSynchronization/DocumentDidChangeEndpointTest.cs @@ -27,7 +27,7 @@ public void ApplyContentChanges_SingleChange() var sourceText = SourceText.From("Hello World"); var change = new TextDocumentContentChangeEvent() { - Range = VsLspFactory.CreateZeroWidthRange(0, 5), + Range = LspFactory.CreateZeroWidthRange(0, 5), RangeLength = 0, Text = "!" }; @@ -48,7 +48,7 @@ public void ApplyContentChanges_MultipleChanges() var changes = new[] { new TextDocumentContentChangeEvent() { - Range = VsLspFactory.CreateZeroWidthRange(0, 5), + Range = LspFactory.CreateZeroWidthRange(0, 5), RangeLength = 0, Text = Environment.NewLine }, @@ -57,7 +57,7 @@ public void ApplyContentChanges_MultipleChanges() new TextDocumentContentChangeEvent() { - Range = VsLspFactory.CreateZeroWidthRange(1, 0), + Range = LspFactory.CreateZeroWidthRange(1, 0), RangeLength = 0, Text = "!" }, @@ -66,7 +66,7 @@ public void ApplyContentChanges_MultipleChanges() new TextDocumentContentChangeEvent() { - Range = VsLspFactory.CreateZeroWidthRange(0, 1), + Range = LspFactory.CreateZeroWidthRange(0, 1), RangeLength = 4, Text = """ i! @@ -109,7 +109,7 @@ public async Task Handle_DidChangeTextDocument_UpdatesDocument() var endpoint = new DocumentDidChangeEndpoint(projectService.Object, LoggerFactory); var change = new TextDocumentContentChangeEvent() { - Range = VsLspFactory.CreateZeroWidthRange(0, 3), + Range = LspFactory.CreateZeroWidthRange(0, 3), RangeLength = 0, Text = "

" }; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/DocumentOnTypeFormattingEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/DocumentOnTypeFormattingEndpointTest.cs index 0ba0f51c73c..1fdb5d79ae8 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/DocumentOnTypeFormattingEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/DocumentOnTypeFormattingEndpointTest.cs @@ -62,7 +62,7 @@ public async Task Handle_OnTypeFormatting_DocumentNotFound_ReturnsNull() { TextDocument = new TextDocumentIdentifier { Uri = uri, }, Character = ".", - Position = VsLspFactory.CreatePosition(2, 11), + Position = LspFactory.CreatePosition(2, 11), Options = new FormattingOptions { InsertSpaces = true, TabSize = 4 } }; var requestContext = CreateRazorRequestContext(documentContext); @@ -97,7 +97,7 @@ public async Task Handle_OnTypeFormatting_RemapFailed_ReturnsNull() { TextDocument = new TextDocumentIdentifier { Uri = uri, }, Character = ".", - Position = VsLspFactory.CreatePosition(2, 11), + Position = LspFactory.CreatePosition(2, 11), Options = new FormattingOptions { InsertSpaces = true, TabSize = 4 }, }; var requestContext = CreateRazorRequestContext(documentContext); @@ -133,7 +133,7 @@ public async Task Handle_OnTypeFormatting_HtmlLanguageKind_ReturnsNull() { TextDocument = new TextDocumentIdentifier { Uri = uri, }, Character = "}", - Position = VsLspFactory.CreatePosition(2, 11), + Position = LspFactory.CreatePosition(2, 11), Options = new FormattingOptions { InsertSpaces = true, TabSize = 4 }, }; var requestContext = CreateRazorRequestContext(documentContext); @@ -169,7 +169,7 @@ public async Task Handle_OnTypeFormatting_RazorLanguageKind_ReturnsNull() { TextDocument = new TextDocumentIdentifier { Uri = uri, }, Character = "}", - Position = VsLspFactory.CreatePosition(2, 11), + Position = LspFactory.CreatePosition(2, 11), Options = new FormattingOptions { InsertSpaces = true, TabSize = 4 } }; var requestContext = CreateRazorRequestContext(documentContext); @@ -204,7 +204,7 @@ public async Task Handle_OnTypeFormatting_UnexpectedTriggerCharacter_ReturnsNull { TextDocument = new TextDocumentIdentifier { Uri = uri, }, Character = ".", - Position = VsLspFactory.CreatePosition(2, 11), + Position = LspFactory.CreatePosition(2, 11), Options = new FormattingOptions { InsertSpaces = true, TabSize = 4 } }; Assert.True(documentContextFactory.TryCreateForOpenDocument(uri, out var documentContext)); diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingContentValidationPassTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingContentValidationPassTest.cs index 4e9160ab8b6..a463f8fbea6 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingContentValidationPassTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingContentValidationPassTest.cs @@ -72,7 +72,7 @@ public class Foo { } using var context = CreateFormattingContext(source); var edits = new[] { - VsLspFactory.CreateTextEdit(2, 0, " ") + LspFactory.CreateTextEdit(2, 0, " ") }; var input = new FormattingResult(edits, RazorLanguageKind.Razor); var pass = GetPass(); @@ -96,7 +96,7 @@ public class Foo { } using var context = CreateFormattingContext(source); var edits = new[] { - VsLspFactory.CreateTextEdit(2, 0, 3, 0, " ") // Nukes a line + LspFactory.CreateTextEdit(2, 0, 3, 0, " ") // Nukes a line }; var input = new FormattingResult(edits, RazorLanguageKind.Razor); var pass = GetPass(); diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingDiagnosticValidationPassTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingDiagnosticValidationPassTest.cs index ed17457db2a..7a36ce7ae5d 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingDiagnosticValidationPassTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingDiagnosticValidationPassTest.cs @@ -28,7 +28,7 @@ public class Foo { } } "); using var context = CreateFormattingContext(source); - var badEdit = VsLspFactory.CreateTextEdit(position: (0, 0), "@ "); + var badEdit = LspFactory.CreateTextEdit(position: (0, 0), "@ "); var input = new FormattingResult([badEdit], RazorLanguageKind.CSharp); var pass = GetPass(); @@ -49,7 +49,7 @@ public class Foo { } } "); using var context = CreateFormattingContext(source); - var badEdit = VsLspFactory.CreateTextEdit(position: (0, 0), "@ "); + var badEdit = LspFactory.CreateTextEdit(position: (0, 0), "@ "); var input = new FormattingResult([badEdit], RazorLanguageKind.Html); var pass = GetPass(); @@ -72,7 +72,7 @@ public class Foo { } using var context = CreateFormattingContext(source); var edits = new[] { - VsLspFactory.CreateTextEdit(2, 0, " ") + LspFactory.CreateTextEdit(2, 0, " ") }; var input = new FormattingResult(edits, RazorLanguageKind.Razor); var pass = GetPass(); @@ -94,7 +94,7 @@ public class Foo { } } "); using var context = CreateFormattingContext(source); - var badEdit = VsLspFactory.CreateTextEdit(position: (0, 0), "@ "); // Creates a diagnostic + var badEdit = LspFactory.CreateTextEdit(position: (0, 0), "@ "); // Creates a diagnostic var input = new FormattingResult([badEdit], RazorLanguageKind.Razor); var pass = GetPass(); diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingLanguageServerClient.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingLanguageServerClient.cs index 5c77e198d46..daf60dbe6fd 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingLanguageServerClient.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingLanguageServerClient.cs @@ -129,7 +129,7 @@ private async Task CallWebToolsApplyFormattedEd foreach (var textChange in response.TextChanges) { var span = new TextSpan(textChange.Position, textChange.Length); - var edit = VsLspFactory.CreateTextEdit(sourceText.GetRange(span), textChange.NewText); + var edit = LspFactory.CreateTextEdit(sourceText.GetRange(span), textChange.NewText); edits.Add(edit); } diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingTestBase.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingTestBase.cs index 9ec26d51add..8e3bef3a2e0 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingTestBase.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingTestBase.cs @@ -208,7 +208,7 @@ protected async Task RunCodeActionFormattingTestAsync( } protected static TextEdit Edit(int startLine, int startChar, int endLine, int endChar, string newText) - => VsLspFactory.CreateTextEdit(startLine, startChar, endLine, endChar, newText); + => LspFactory.CreateTextEdit(startLine, startChar, endLine, endChar, newText); private static SourceText ApplyEdits(SourceText source, TextEdit[] edits) { diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/RazorFormattingServiceTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/RazorFormattingServiceTest.cs index 889ecd2cfaa..a61de35e8b0 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/RazorFormattingServiceTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/RazorFormattingServiceTest.cs @@ -26,8 +26,8 @@ public class Foo{} var sourceText = SourceText.From(source); var edits = new[] { - VsLspFactory.CreateTextEdit(VsLspFactory.CreateSingleLineRange(line: 2, character: 13, length: 3), "Bar"), - VsLspFactory.CreateTextEdit(2, 0, " ") + LspFactory.CreateTextEdit(LspFactory.CreateSingleLineRange(line: 2, character: 13, length: 3), "Bar"), + LspFactory.CreateTextEdit(2, 0, " ") }; // Act diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Hover/HoverServiceTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Hover/HoverServiceTest.cs index 335945678d6..1c533c81c72 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Hover/HoverServiceTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Hover/HoverServiceTest.cs @@ -72,7 +72,7 @@ public async Task GetHoverInfo_TagHelper_Element() // Assert Assert.Contains("**Test1TagHelper**", ((MarkupContent)hover.Contents).Value, StringComparison.Ordinal); - var expectedRange = VsLspFactory.CreateSingleLineRange(line: 1, character: 1, length: 5); + var expectedRange = LspFactory.CreateSingleLineRange(line: 1, character: 1, length: 5); Assert.Equal(expectedRange, hover.Range); } @@ -98,7 +98,7 @@ public async Task GetHoverInfo_TagHelper_Element_WithParent() // Assert Assert.Contains("**SomeChild**", ((MarkupContent)hover.Contents).Value, StringComparison.Ordinal); - var expectedRange = VsLspFactory.CreateSingleLineRange(line: 2, character: 5, length: 9); + var expectedRange = LspFactory.CreateSingleLineRange(line: 2, character: 5, length: 9); Assert.Equal(expectedRange, hover.Range); } @@ -148,7 +148,7 @@ public async Task GetHoverInfo_TagHelper_Element_EndTag() // Assert Assert.Contains("**Test1TagHelper**", ((MarkupContent)hover.Contents).Value, StringComparison.Ordinal); - var expectedRange = VsLspFactory.CreateSingleLineRange(line: 1, character: 9, length: 5); + var expectedRange = LspFactory.CreateSingleLineRange(line: 1, character: 9, length: 5); Assert.Equal(expectedRange, hover.Range); } @@ -173,7 +173,7 @@ public async Task GetHoverInfo_TagHelper_Attribute() // Assert Assert.Contains("**BoolVal**", ((MarkupContent)hover.Contents).Value, StringComparison.Ordinal); Assert.DoesNotContain("**IntVal**", ((MarkupContent)hover.Contents).Value, StringComparison.Ordinal); - var expectedRange = VsLspFactory.CreateSingleLineRange(line: 1, character: 7, length: 8); + var expectedRange = LspFactory.CreateSingleLineRange(line: 1, character: 7, length: 8); Assert.Equal(expectedRange, hover.Range); } @@ -199,7 +199,7 @@ public async Task GetHoverInfo_TagHelper_AttributeTrailingEdge() // Assert Assert.Contains("**BoolVal**", ((MarkupContent)hover.Contents).Value, StringComparison.Ordinal); Assert.DoesNotContain("**IntVal**", ((MarkupContent)hover.Contents).Value, StringComparison.Ordinal); - var expectedRange = VsLspFactory.CreateSingleLineRange(line: 1, character: 7, length: 8); + var expectedRange = LspFactory.CreateSingleLineRange(line: 1, character: 7, length: 8); Assert.Equal(expectedRange, hover.Range); } @@ -290,7 +290,7 @@ public async Task GetHoverInfo_TagHelper_MinimizedAttribute() // Assert Assert.Contains("**BoolVal**", ((MarkupContent)hover.Contents).Value, StringComparison.Ordinal); Assert.DoesNotContain("**IntVal**", ((MarkupContent)hover.Contents).Value, StringComparison.Ordinal); - var expectedRange = VsLspFactory.CreateSingleLineRange(line: 1, character: 7, length: 8); + var expectedRange = LspFactory.CreateSingleLineRange(line: 1, character: 7, length: 8); Assert.Equal(expectedRange, hover.Range); } @@ -319,7 +319,7 @@ public void Increment(){ // Assert Assert.NotNull(hover); Assert.Contains("**Test**", ((MarkupContent)hover.Contents).Value, StringComparison.Ordinal); - var expectedRange = VsLspFactory.CreateSingleLineRange(line: 1, character: 5, length: 5); + var expectedRange = LspFactory.CreateSingleLineRange(line: 1, character: 5, length: 5); Assert.Equal(expectedRange, hover.Range); } @@ -343,7 +343,7 @@ public async Task GetHoverInfo_TagHelper_MalformedElement() // Assert Assert.Contains("**Test1TagHelper**", ((MarkupContent)hover.Contents).Value, StringComparison.Ordinal); - var expectedRange = VsLspFactory.CreateSingleLineRange(line: 1, character: 1, length: 5); + var expectedRange = LspFactory.CreateSingleLineRange(line: 1, character: 1, length: 5); Assert.Equal(expectedRange, hover.Range); } @@ -368,7 +368,7 @@ public async Task GetHoverInfo_TagHelper_MalformedAttribute() // Assert Assert.Contains("**BoolVal**", ((MarkupContent)hover.Contents).Value, StringComparison.Ordinal); Assert.DoesNotContain("**IntVal**", ((MarkupContent)hover.Contents).Value, StringComparison.Ordinal); - var expectedRange = VsLspFactory.CreateSingleLineRange(line: 1, character: 7, length: 8); + var expectedRange = LspFactory.CreateSingleLineRange(line: 1, character: 7, length: 8); Assert.Equal(expectedRange, hover.Range); } @@ -416,7 +416,7 @@ public async Task GetHoverInfo_TagHelper_PlainTextElement() // Assert Assert.Contains("Test1TagHelper", ((MarkupContent)hover.Contents).Value, StringComparison.Ordinal); Assert.Equal(MarkupKind.PlainText, ((MarkupContent)hover.Contents).Kind); - var expectedRange = VsLspFactory.CreateSingleLineRange(line: 1, character: 1, length: 5); + var expectedRange = LspFactory.CreateSingleLineRange(line: 1, character: 1, length: 5); Assert.Equal(expectedRange, hover.Range); } @@ -442,7 +442,7 @@ public async Task GetHoverInfo_TagHelper_PlainTextElement_EndTag() // Assert Assert.Contains("Test1TagHelper", ((MarkupContent)hover.Contents).Value, StringComparison.Ordinal); Assert.Equal(MarkupKind.PlainText, ((MarkupContent)hover.Contents).Kind); - var expectedRange = VsLspFactory.CreateSingleLineRange(line: 1, character: 9, length: 5); + var expectedRange = LspFactory.CreateSingleLineRange(line: 1, character: 9, length: 5); Assert.Equal(expectedRange, hover.Range); } @@ -467,7 +467,7 @@ public async Task GetHoverInfo_TagHelper_TextComponent() // Assert Assert.Contains("Text", ((MarkupContent)hover.Contents).Value, StringComparison.Ordinal); Assert.Equal(MarkupKind.PlainText, ((MarkupContent)hover.Contents).Kind); - var expectedRange = VsLspFactory.CreateSingleLineRange(line: 0, character: 1, length: 4); + var expectedRange = LspFactory.CreateSingleLineRange(line: 0, character: 1, length: 4); Assert.Equal(expectedRange, hover.Range); } @@ -494,7 +494,7 @@ public async Task GetHoverInfo_TagHelper_TextComponent_NestedInHtml() // Assert Assert.Contains("Text", ((MarkupContent)hover.Contents).Value, StringComparison.Ordinal); Assert.Equal(MarkupKind.PlainText, ((MarkupContent)hover.Contents).Kind); - var expectedRange = VsLspFactory.CreateSingleLineRange(line: 1, character: 5, length: 4); + var expectedRange = LspFactory.CreateSingleLineRange(line: 1, character: 5, length: 4); Assert.Equal(expectedRange, hover.Range); } @@ -549,7 +549,7 @@ public async Task GetHoverInfo_TagHelper_TextComponent_NestedInCSharpAndText() // Assert Assert.Contains("Text", ((MarkupContent)hover.Contents).Value, StringComparison.Ordinal); Assert.Equal(MarkupKind.PlainText, ((MarkupContent)hover.Contents).Kind); - var expectedRange = VsLspFactory.CreateSingleLineRange(line: 3, character: 9, length: 4); + var expectedRange = LspFactory.CreateSingleLineRange(line: 3, character: 9, length: 4); Assert.Equal(expectedRange, hover.Range); } @@ -576,7 +576,7 @@ public async Task GetHoverInfo_TagHelper_PlainTextAttribute() Assert.Contains("BoolVal", ((MarkupContent)hover.Contents).Value, StringComparison.Ordinal); Assert.DoesNotContain("IntVal", ((MarkupContent)hover.Contents).Value, StringComparison.Ordinal); Assert.Equal(MarkupKind.PlainText, ((MarkupContent)hover.Contents).Kind); - var expectedRange = VsLspFactory.CreateSingleLineRange(line: 1, character: 7, length: 8); + var expectedRange = LspFactory.CreateSingleLineRange(line: 1, character: 7, length: 8); Assert.Equal(expectedRange, hover.Range); } @@ -650,7 +650,7 @@ public async Task GetHoverInfo_TagHelper_Element_VSClient_ReturnVSHover() // Assert Assert.False(vsHover.Contents.Value.TryGetFourth(out var _)); Assert.True(vsHover.Contents.Value.TryGetThird(out var _) && !vsHover.Contents.Value.Third.Any()); - var expectedRange = VsLspFactory.CreateSingleLineRange(line: 1, character: 1, length: 5); + var expectedRange = LspFactory.CreateSingleLineRange(line: 1, character: 1, length: 5); Assert.Equal(expectedRange, vsHover.Range); var container = (ContainerElement)vsHover.RawContent; @@ -691,7 +691,7 @@ public async Task GetHoverInfo_TagHelper_Attribute_VSClient_ReturnVSHover() // Assert Assert.False(vsHover.Contents.Value.TryGetFourth(out var _)); Assert.True(vsHover.Contents.Value.TryGetThird(out var markedStrings) && !markedStrings.Any()); - var expectedRange = VsLspFactory.CreateSingleLineRange(line: 1, character: 7, length: 8); + var expectedRange = LspFactory.CreateSingleLineRange(line: 1, character: 7, length: 8); Assert.Equal(expectedRange, vsHover.Range); var container = (ContainerElement)vsHover.RawContent; @@ -749,7 +749,7 @@ public async Task Handle_Hover_SingleServer_CallsDelegatedLanguageServer() { Uri = new Uri("C:/text.razor") }, - Position = VsLspFactory.CreatePosition(1, 0), + Position = LspFactory.CreatePosition(1, 0), }; var documentContext = CreateDefaultDocumentContext(); var requestContext = CreateRazorRequestContext(documentContext: documentContext); @@ -780,7 +780,7 @@ public async Task Handle_Hover_SingleServer_CSharpVariable() // Assert var range = result.Range; - var expected = VsLspFactory.CreateSingleLineRange(line: 3, character: 8, length: 10); + var expected = LspFactory.CreateSingleLineRange(line: 3, character: 8, length: 10); Assert.Equal(expected, range); @@ -810,7 +810,7 @@ public async Task Handle_Hover_SingleServer_Component() // Assert var range = result.Range; - var expected = VsLspFactory.CreateSingleLineRange(line: 2, character: 1, length: 5); + var expected = LspFactory.CreateSingleLineRange(line: 2, character: 1, length: 5); Assert.Equal(expected, range); diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/InlayHints/InlayHintEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/InlayHints/InlayHintEndpointTest.cs index 82b4e407c2d..b58e504a512 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/InlayHints/InlayHintEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/InlayHints/InlayHintEndpointTest.cs @@ -105,7 +105,7 @@ private async Task VerifyInlayHintsAsync(string input, Dictionary + Position = LspFactory.CreatePosition(1, 3) // }; var requestContext = CreateRazorRequestContext(documentContext: null); @@ -51,13 +51,13 @@ public async Task Handle_TagHelperStartTag_ReturnsCorrectRange() var request = new LinkedEditingRangeParams { TextDocument = new TextDocumentIdentifier { Uri = uri }, - Position = VsLspFactory.CreatePosition(1, 3) // + Position = LspFactory.CreatePosition(1, 3) // }; var expectedRanges = new[] { - VsLspFactory.CreateSingleLineRange(line: 1, character: 1, length: 5), - VsLspFactory.CreateSingleLineRange(line: 1, character: 9, length: 5) + LspFactory.CreateSingleLineRange(line: 1, character: 1, length: 5), + LspFactory.CreateSingleLineRange(line: 1, character: 9, length: 5) }; var requestContext = CreateRazorRequestContext(documentContext); @@ -84,13 +84,13 @@ public async Task Handle_TagHelperStartTag_ReturnsCorrectRange_EndSpan() var request = new LinkedEditingRangeParams { TextDocument = new TextDocumentIdentifier { Uri = uri }, - Position = VsLspFactory.CreatePosition(1, 6) // + Position = LspFactory.CreatePosition(1, 6) // }; var expectedRanges = new[] { - VsLspFactory.CreateSingleLineRange(line: 1, character: 1, length: 5), - VsLspFactory.CreateSingleLineRange(line: 1, character: 9, length: 5) + LspFactory.CreateSingleLineRange(line: 1, character: 1, length: 5), + LspFactory.CreateSingleLineRange(line: 1, character: 9, length: 5) }; var requestContext = CreateRazorRequestContext(documentContext); @@ -117,13 +117,13 @@ public async Task Handle_TagHelperEndTag_ReturnsCorrectRange() var request = new LinkedEditingRangeParams { TextDocument = new TextDocumentIdentifier { Uri = uri }, - Position = VsLspFactory.CreatePosition(1, 9) // + Position = LspFactory.CreatePosition(1, 9) // }; var expectedRanges = new[] { - VsLspFactory.CreateSingleLineRange(line: 1, character: 1, length: 5), - VsLspFactory.CreateSingleLineRange(line: 1, character: 9, length: 5) + LspFactory.CreateSingleLineRange(line: 1, character: 1, length: 5), + LspFactory.CreateSingleLineRange(line: 1, character: 9, length: 5) }; var requestContext = CreateRazorRequestContext(documentContext); @@ -150,7 +150,7 @@ public async Task Handle_NoTag_ReturnsNull() var request = new LinkedEditingRangeParams { TextDocument = new TextDocumentIdentifier { Uri = uri }, - Position = VsLspFactory.CreatePosition(0, 1) // @[||]addTagHelper * + Position = LspFactory.CreatePosition(0, 1) // @[||]addTagHelper * }; var requestContext = CreateRazorRequestContext(documentContext); @@ -176,7 +176,7 @@ public async Task Handle_SelfClosingTagHelper_ReturnsNull() var request = new LinkedEditingRangeParams { TextDocument = new TextDocumentIdentifier { Uri = uri }, - Position = VsLspFactory.CreatePosition(1, 3) // + Position = LspFactory.CreatePosition(1, 3) // }; var requestContext = CreateRazorRequestContext(documentContext); @@ -202,13 +202,13 @@ public async Task Handle_NestedTagHelperStartTags_ReturnsCorrectRange() var request = new LinkedEditingRangeParams { TextDocument = new TextDocumentIdentifier { Uri = uri }, - Position = VsLspFactory.CreatePosition(1, 1) // <[||]test1> + Position = LspFactory.CreatePosition(1, 1) // <[||]test1> }; var expectedRanges = new[] { - VsLspFactory.CreateSingleLineRange(line: 1, character: 1, length: 5), - VsLspFactory.CreateSingleLineRange(line: 1, character: 24, length: 5) + LspFactory.CreateSingleLineRange(line: 1, character: 1, length: 5), + LspFactory.CreateSingleLineRange(line: 1, character: 24, length: 5) }; var requestContext = CreateRazorRequestContext(documentContext); @@ -235,13 +235,13 @@ public async Task Handle_HTMLStartTag_ReturnsCorrectRange() var request = new LinkedEditingRangeParams { TextDocument = new TextDocumentIdentifier { Uri = uri }, - Position = VsLspFactory.CreatePosition(1, 3) // + Position = LspFactory.CreatePosition(1, 3) // }; var expectedRanges = new[] { - VsLspFactory.CreateSingleLineRange(line: 1, character: 1, length: 4), - VsLspFactory.CreateSingleLineRange(line: 1, character: 8, length: 4) + LspFactory.CreateSingleLineRange(line: 1, character: 1, length: 4), + LspFactory.CreateSingleLineRange(line: 1, character: 8, length: 4) }; var requestContext = CreateRazorRequestContext(documentContext); @@ -268,13 +268,13 @@ public async Task Handle_HTMLEndTag_ReturnsCorrectRange() var request = new LinkedEditingRangeParams { TextDocument = new TextDocumentIdentifier { Uri = uri }, - Position = VsLspFactory.CreatePosition(1, 8) // + Position = LspFactory.CreatePosition(1, 8) // }; var expectedRanges = new[] { - VsLspFactory.CreateSingleLineRange(line: 1, character: 1, length: 4), - VsLspFactory.CreateSingleLineRange(line: 1, character: 8, length: 4) + LspFactory.CreateSingleLineRange(line: 1, character: 1, length: 4), + LspFactory.CreateSingleLineRange(line: 1, character: 8, length: 4) }; var requestContext = CreateRazorRequestContext(documentContext); @@ -301,7 +301,7 @@ public async Task Handle_SelfClosingHTMLTag_ReturnsNull() var request = new LinkedEditingRangeParams { TextDocument = new TextDocumentIdentifier { Uri = uri }, - Position = VsLspFactory.CreatePosition(1, 3) // + Position = LspFactory.CreatePosition(1, 3) // }; var requestContext = CreateRazorRequestContext(documentContext); diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Mapping/RazorLanguageQueryEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Mapping/RazorLanguageQueryEndpointTest.cs index 7f056bbde56..f788b4c06fd 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Mapping/RazorLanguageQueryEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Mapping/RazorLanguageQueryEndpointTest.cs @@ -41,7 +41,7 @@ public async Task Handle_ResolvesLanguageRequest_Razor() var request = new RazorLanguageQueryParams() { Uri = documentPath, - Position = VsLspFactory.CreatePosition(0, 1), + Position = LspFactory.CreatePosition(0, 1), }; var requestContext = CreateRazorRequestContext(documentContext); @@ -68,7 +68,7 @@ public async Task Handle_ResolvesLanguageRequest_Html() var request = new RazorLanguageQueryParams() { Uri = documentPath, - Position = VsLspFactory.CreatePosition(0, 2), + Position = LspFactory.CreatePosition(0, 2), }; var requestContext = CreateRazorRequestContext(documentContext); @@ -98,7 +98,7 @@ public async Task Handle_ResolvesLanguageRequest_CSharp() var request = new RazorLanguageQueryParams() { Uri = documentPath, - Position = VsLspFactory.CreatePosition(0, 1), + Position = LspFactory.CreatePosition(0, 1), }; var requestContext = CreateRazorRequestContext(documentContext); @@ -129,7 +129,7 @@ public async Task Handle_Unsupported_ResolvesLanguageRequest_Html() var request = new RazorLanguageQueryParams() { Uri = documentPath, - Position = VsLspFactory.CreatePosition(0, 1), + Position = LspFactory.CreatePosition(0, 1), }; var requestContext = CreateRazorRequestContext(documentContext); diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Mapping/RazorMapToDocumentRangesEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Mapping/RazorMapToDocumentRangesEndpointTest.cs index 60cad5462b1..ed5683d7d7e 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Mapping/RazorMapToDocumentRangesEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Mapping/RazorMapToDocumentRangesEndpointTest.cs @@ -48,10 +48,10 @@ public async Task Handle_MapToDocumentRanges_CSharp() var request = new RazorMapToDocumentRangesParams() { Kind = RazorLanguageKind.CSharp, - ProjectedRanges = [VsLspFactory.CreateSingleLineRange(line: 0, character: 10, length: 12)], + ProjectedRanges = [LspFactory.CreateSingleLineRange(line: 0, character: 10, length: 12)], RazorDocumentUri = documentPath, }; - var expectedRange = VsLspFactory.CreateSingleLineRange(line: 0, character: 4, length: 12); + var expectedRange = LspFactory.CreateSingleLineRange(line: 0, character: 4, length: 12); var requestContext = CreateRazorRequestContext(documentContext); @@ -82,7 +82,7 @@ public async Task Handle_MapToDocumentRanges_CSharp_Unmapped() var request = new RazorMapToDocumentRangesParams() { Kind = RazorLanguageKind.CSharp, - ProjectedRanges = [VsLspFactory.CreateSingleLineRange(start: (0, 0), length: 3)], + ProjectedRanges = [LspFactory.CreateSingleLineRange(start: (0, 0), length: 3)], RazorDocumentUri = documentPath, }; @@ -93,7 +93,7 @@ public async Task Handle_MapToDocumentRanges_CSharp_Unmapped() // Assert Assert.NotNull(response); - Assert.Equal(VsLspFactory.UndefinedRange, response!.Ranges[0]); + Assert.Equal(LspFactory.UndefinedRange, response!.Ranges[0]); Assert.Equal(1337, response.HostDocumentVersion); } @@ -115,7 +115,7 @@ public async Task Handle_MapToDocumentRanges_CSharp_LeadingOverlapsUnmapped() var request = new RazorMapToDocumentRangesParams() { Kind = RazorLanguageKind.CSharp, - ProjectedRanges = [VsLspFactory.CreateSingleLineRange(start: (0, 0), length: 22)], + ProjectedRanges = [LspFactory.CreateSingleLineRange(start: (0, 0), length: 22)], RazorDocumentUri = documentPath, }; @@ -126,7 +126,7 @@ public async Task Handle_MapToDocumentRanges_CSharp_LeadingOverlapsUnmapped() // Assert Assert.NotNull(response); - Assert.Equal(VsLspFactory.UndefinedRange, response!.Ranges[0]); + Assert.Equal(LspFactory.UndefinedRange, response!.Ranges[0]); Assert.Equal(1337, response.HostDocumentVersion); } @@ -148,7 +148,7 @@ public async Task Handle_MapToDocumentRanges_CSharp_TrailingOverlapsUnmapped() var request = new RazorMapToDocumentRangesParams() { Kind = RazorLanguageKind.CSharp, - ProjectedRanges = [VsLspFactory.CreateSingleLineRange(line: 0, character : 10, length: 13)], + ProjectedRanges = [LspFactory.CreateSingleLineRange(line: 0, character : 10, length: 13)], RazorDocumentUri = documentPath, }; @@ -159,7 +159,7 @@ public async Task Handle_MapToDocumentRanges_CSharp_TrailingOverlapsUnmapped() // Assert Assert.NotNull(response); - Assert.Equal(VsLspFactory.UndefinedRange, response!.Ranges[0]); + Assert.Equal(LspFactory.UndefinedRange, response!.Ranges[0]); Assert.Equal(1337, response.HostDocumentVersion); } @@ -174,7 +174,7 @@ public async Task Handle_MapToDocumentRanges_Html() var request = new RazorMapToDocumentRangesParams() { Kind = RazorLanguageKind.Html, - ProjectedRanges = [VsLspFactory.CreateSingleLineRange(line: 0, character: 16, length: 4)], + ProjectedRanges = [LspFactory.CreateSingleLineRange(line: 0, character: 16, length: 4)], RazorDocumentUri = documentPath, }; @@ -200,7 +200,7 @@ public async Task Handle_MapToDocumentRanges_Razor() var request = new RazorMapToDocumentRangesParams() { Kind = RazorLanguageKind.Razor, - ProjectedRanges = [VsLspFactory.CreateSingleLineRange(line: 0, character: 4, length: 1)], + ProjectedRanges = [LspFactory.CreateSingleLineRange(line: 0, character: 4, length: 1)], RazorDocumentUri = documentPath, }; @@ -234,7 +234,7 @@ public async Task Handle_MapToDocumentRanges_Unsupported() var request = new RazorMapToDocumentRangesParams() { Kind = RazorLanguageKind.CSharp, - ProjectedRanges = [VsLspFactory.CreateSingleLineRange(line: 0, character: 10, length: 12)], + ProjectedRanges = [LspFactory.CreateSingleLineRange(line: 0, character: 10, length: 12)], RazorDocumentUri = documentPath, }; @@ -245,7 +245,7 @@ public async Task Handle_MapToDocumentRanges_Unsupported() // Assert Assert.NotNull(response); - Assert.Equal(VsLspFactory.UndefinedRange, response!.Ranges[0]); + Assert.Equal(LspFactory.UndefinedRange, response!.Ranges[0]); Assert.Equal(1337, response.HostDocumentVersion); } diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/RangeExtensionsTests.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/RangeExtensionsTests.cs index 98e5dc223d1..6e11b326a24 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/RangeExtensionsTests.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/RangeExtensionsTests.cs @@ -13,8 +13,8 @@ public class RangeExtensionsTests public void CompareTo_StartAndEndAreSame_ReturnsZero() { // Arrange - var range1 = VsLspFactory.CreateRange(1, 2, 3, 4); - var range2 = VsLspFactory.CreateRange(1, 2, 3, 4); + var range1 = LspFactory.CreateRange(1, 2, 3, 4); + var range2 = LspFactory.CreateRange(1, 2, 3, 4); // Act var result = range1.CompareTo(range2); @@ -27,8 +27,8 @@ public void CompareTo_StartAndEndAreSame_ReturnsZero() public void CompareTo_StartOfThisRangeIsBeforeOther_ReturnsNegative() { // Arrange - var range1 = VsLspFactory.CreateRange(1, 2, 3, 4); - var range2 = VsLspFactory.CreateRange(2, 2, 3, 4); + var range1 = LspFactory.CreateRange(1, 2, 3, 4); + var range2 = LspFactory.CreateRange(2, 2, 3, 4); // Act var result = range1.CompareTo(range2); @@ -41,8 +41,8 @@ public void CompareTo_StartOfThisRangeIsBeforeOther_ReturnsNegative() public void CompareTo_EndOfThisRangeIsBeforeOther_ReturnsNegative() { // Arrange - var range1 = VsLspFactory.CreateRange(1, 2, 3, 4); - var range2 = VsLspFactory.CreateRange(1, 2, 4, 4); + var range1 = LspFactory.CreateRange(1, 2, 3, 4); + var range2 = LspFactory.CreateRange(1, 2, 4, 4); // Act var result = range1.CompareTo(range2); @@ -55,8 +55,8 @@ public void CompareTo_EndOfThisRangeIsBeforeOther_ReturnsNegative() public void CompareTo_StartOfThisRangeIsAfterOther_ReturnsPositive() { // Arrange - var range1 = VsLspFactory.CreateRange(2, 2, 3, 4); - var range2 = VsLspFactory.CreateRange(1, 2, 3, 4); + var range1 = LspFactory.CreateRange(2, 2, 3, 4); + var range2 = LspFactory.CreateRange(1, 2, 3, 4); // Act var result = range1.CompareTo(range2); @@ -69,8 +69,8 @@ public void CompareTo_StartOfThisRangeIsAfterOther_ReturnsPositive() public void CompareTo_EndOfThisRangeIsAfterOther_ReturnsPositive() { // Arrange - var range1 = VsLspFactory.CreateRange(1, 2, 4, 4); - var range2 = VsLspFactory.CreateRange(1, 2, 3, 4); + var range1 = LspFactory.CreateRange(1, 2, 4, 4); + var range2 = LspFactory.CreateRange(1, 2, 3, 4); // Act var result = range1.CompareTo(range2); diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Refactoring/RenameEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Refactoring/RenameEndpointTest.cs index 879c0bf5fbe..4ff2ec8d1f8 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Refactoring/RenameEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Refactoring/RenameEndpointTest.cs @@ -117,7 +117,7 @@ public async Task Handle_Rename_FileManipulationNotSupported_ReturnsNull() var request = new RenameParams { TextDocument = new() { Uri = uri }, - Position = VsLspFactory.CreatePosition(2, 1), + Position = LspFactory.CreatePosition(2, 1), NewName = "Component5" }; @@ -140,7 +140,7 @@ public async Task Handle_Rename_WithNamespaceDirective() var request = new RenameParams { TextDocument = new() { Uri = uri }, - Position = VsLspFactory.CreatePosition(2, 1), + Position = LspFactory.CreatePosition(2, 1), NewName = "Component5" }; @@ -181,7 +181,7 @@ public async Task Handle_Rename_OnComponentParameter_ReturnsNull() var request = new RenameParams { TextDocument = new() { Uri = uri }, - Position = VsLspFactory.CreatePosition(1, 14), + Position = LspFactory.CreatePosition(1, 14), NewName = "Test2" }; @@ -204,7 +204,7 @@ public async Task Handle_Rename_OnOpeningBrace_ReturnsNull() var request = new RenameParams { TextDocument = new() { Uri = uri }, - Position = VsLspFactory.CreatePosition(1, 0), + Position = LspFactory.CreatePosition(1, 0), NewName = "Test2" }; @@ -227,7 +227,7 @@ public async Task Handle_Rename_OnComponentNameLeadingEdge_ReturnsResult() var request = new RenameParams { TextDocument = new() { Uri = uri }, - Position = VsLspFactory.CreatePosition(1, 1), + Position = LspFactory.CreatePosition(1, 1), NewName = "Test2" }; @@ -250,7 +250,7 @@ public async Task Handle_Rename_OnComponentName_ReturnsResult() var request = new RenameParams { TextDocument = new() { Uri = uri }, - Position = VsLspFactory.CreatePosition(1, 3), + Position = LspFactory.CreatePosition(1, 3), NewName = "Test2" }; @@ -273,7 +273,7 @@ public async Task Handle_Rename_OnComponentNameTrailingEdge_ReturnsResult() var request = new RenameParams { TextDocument = new() { Uri = uri }, - Position = VsLspFactory.CreatePosition(1, 10), + Position = LspFactory.CreatePosition(1, 10), NewName = "Test2" }; @@ -296,7 +296,7 @@ public async Task Handle_Rename_ComponentInSameFile() var request = new RenameParams { TextDocument = new() { Uri = uri }, - Position = VsLspFactory.CreatePosition(1, 1), + Position = LspFactory.CreatePosition(1, 1), NewName = "Component5" }; @@ -382,7 +382,7 @@ public async Task Handle_Rename_FullyQualifiedAndNot() var request = new RenameParams { TextDocument = new() { Uri = uri }, - Position = VsLspFactory.CreatePosition(2, 1), + Position = LspFactory.CreatePosition(2, 1), NewName = "Component5" }; @@ -428,7 +428,7 @@ public async Task Handle_Rename_MultipleFileUsages() var request = new RenameParams { TextDocument = new() { Uri = uri }, - Position = VsLspFactory.CreatePosition(1, 1), + Position = LspFactory.CreatePosition(1, 1), NewName = "Component5" }; @@ -481,7 +481,7 @@ public async Task Handle_Rename_DifferentDirectories() var request = new RenameParams { TextDocument = new() { Uri = uri }, - Position = VsLspFactory.CreatePosition(1, 1), + Position = LspFactory.CreatePosition(1, 1), NewName = "TestComponent" }; @@ -546,7 +546,7 @@ public async Task Handle_Rename_SingleServer_CallsDelegatedLanguageServer() var request = new RenameParams { TextDocument = new() { Uri = uri }, - Position = VsLspFactory.CreatePosition(1, 0), + Position = LspFactory.CreatePosition(1, 0), NewName = "Test2" }; @@ -580,7 +580,7 @@ public async Task Handle_Rename_SingleServer_DoesNotDelegateForRazor() var request = new RenameParams { TextDocument = new() { Uri = PathUtilities.GetUri(s_componentWithParamFilePath) }, - Position = VsLspFactory.CreatePosition(1, 0), + Position = LspFactory.CreatePosition(1, 0), NewName = "Test2" }; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/WrapWithTag/WrapWithTagEndpointTests.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/WrapWithTag/WrapWithTagEndpointTests.cs index fc85888a50b..4853d918edd 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/WrapWithTag/WrapWithTagEndpointTests.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/WrapWithTag/WrapWithTagEndpointTests.cs @@ -44,7 +44,7 @@ public async Task Handle_Html_ReturnsResult() var wrapWithDivParams = new WrapWithTagParams(new TextDocumentIdentifier { Uri = uri }) { - Range = VsLspFactory.CreateSingleLineRange(start: (0, 0), length: 2), + Range = LspFactory.CreateSingleLineRange(start: (0, 0), length: 2), }; var requestContext = CreateRazorRequestContext(documentContext); @@ -79,7 +79,7 @@ public async Task Handle_CSharp_ReturnsNull() var wrapWithDivParams = new WrapWithTagParams(new TextDocumentIdentifier { Uri = uri }) { - Range = VsLspFactory.CreateSingleLineRange(start: (0, 0), length: 2), + Range = LspFactory.CreateSingleLineRange(start: (0, 0), length: 2), }; var requestContext = CreateRazorRequestContext(documentContext); @@ -114,7 +114,7 @@ public async Task Handle_CSharp_WholeImplicitStatement_ReturnsResult() var wrapWithDivParams = new WrapWithTagParams(new TextDocumentIdentifier { Uri = uri }) { - Range = VsLspFactory.CreateSingleLineRange(start: (0, 0), length: 8), + Range = LspFactory.CreateSingleLineRange(start: (0, 0), length: 8), }; var requestContext = CreateRazorRequestContext(documentContext); @@ -149,7 +149,7 @@ public async Task Handle_CSharp_PartOfImplicitStatement_ReturnsNull() var wrapWithDivParams = new WrapWithTagParams(new TextDocumentIdentifier { Uri = uri }) { - Range = VsLspFactory.CreateSingleLineRange(line: 0, character: 2, length: 2), + Range = LspFactory.CreateSingleLineRange(line: 0, character: 2, length: 2), }; var requestContext = CreateRazorRequestContext(documentContext); @@ -184,7 +184,7 @@ public async Task Handle_CSharp_InImplicitStatement_ReturnsResult() var wrapWithDivParams = new WrapWithTagParams(new TextDocumentIdentifier { Uri = uri }) { - Range = VsLspFactory.CreateZeroWidthRange(0, 4), + Range = LspFactory.CreateZeroWidthRange(0, 4), }; var requestContext = CreateRazorRequestContext(documentContext); @@ -212,7 +212,7 @@ public async Task Handle_DocumentNotFound_ReturnsNull() var wrapWithDivParams = new WrapWithTagParams(new TextDocumentIdentifier { Uri = missingUri }) { - Range = VsLspFactory.CreateSingleLineRange(start: (0, 0), length: 2), + Range = LspFactory.CreateSingleLineRange(start: (0, 0), length: 2), }; var requestContext = CreateRazorRequestContext(documentContext: null); @@ -240,7 +240,7 @@ public async Task Handle_UnsupportedCodeDocument_ReturnsNull() var wrapWithDivParams = new WrapWithTagParams(new TextDocumentIdentifier { Uri = uri }) { - Range = VsLspFactory.CreateSingleLineRange(start: (0, 0), length: 2), + Range = LspFactory.CreateSingleLineRange(start: (0, 0), length: 2), }; var requestContext = CreateRazorRequestContext(documentContext); @@ -274,10 +274,10 @@ public async Task CleanUpTextEdits_NoTilde() var computedEdits = new TextEdit[] { - VsLspFactory.CreateTextEdit(position: (0, 0), "
" + Environment.NewLine + " "), - VsLspFactory.CreateTextEdit(line: 1, character: 0, " "), - VsLspFactory.CreateTextEdit( - range: VsLspFactory.CreateSingleLineRange(line: 2, character: 0, length: 1), + LspFactory.CreateTextEdit(position: (0, 0), "
" + Environment.NewLine + " "), + LspFactory.CreateTextEdit(line: 1, character: 0, " "), + LspFactory.CreateTextEdit( + range: LspFactory.CreateSingleLineRange(line: 2, character: 0, length: 1), newText: " }" + Environment.NewLine + "
"), }; @@ -313,11 +313,11 @@ public async Task CleanUpTextEdits_BadEditWithTilde() var computedEdits = new TextEdit[] { - VsLspFactory.CreateTextEdit(position: (0, 0), "
" + Environment.NewLine + " "), - VsLspFactory.CreateTextEdit(line: 1, character: 0, " "), + LspFactory.CreateTextEdit(position: (0, 0), "
" + Environment.NewLine + " "), + LspFactory.CreateTextEdit(line: 1, character: 0, " "), // This is the problematic edit.. the close brace has been replaced with a tilde - VsLspFactory.CreateTextEdit( - range: VsLspFactory.CreateSingleLineRange(line: 2, character: 0, length: 1), + LspFactory.CreateTextEdit( + range: LspFactory.CreateSingleLineRange(line: 2, character: 0, length: 1), newText: " ~" + Environment.NewLine + "
") }; @@ -353,11 +353,11 @@ public async Task CleanUpTextEdits_GoodEditWithTilde() var computedEdits = new[] { - VsLspFactory.CreateTextEdit(position: (0, 0), "
" + Environment.NewLine + " "), - VsLspFactory.CreateTextEdit(line: 1, character: 0, " "), + LspFactory.CreateTextEdit(position: (0, 0), "
" + Environment.NewLine + " "), + LspFactory.CreateTextEdit(line: 1, character: 0, " "), // This looks like a bad edit, but the original source document had a tilde - VsLspFactory.CreateTextEdit( - range: VsLspFactory.CreateSingleLineRange(line: 2, character: 0, length: 1), + LspFactory.CreateTextEdit( + range: LspFactory.CreateSingleLineRange(line: 2, character: 0, length: 1), newText: " ~" + Environment.NewLine + "
") }; diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostUriPresentationEndpointTest.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostUriPresentationEndpointTest.cs index 981e8f7a8b9..0ca41897540 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostUriPresentationEndpointTest.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostUriPresentationEndpointTest.cs @@ -61,7 +61,7 @@ The end. { Uri = FileUri("File1.razor.g.html") }, - Edits = [VsLspFactory.CreateTextEdit(position: (0, 0), htmlTag)] + Edits = [LspFactory.CreateTextEdit(position: (0, 0), htmlTag)] } } }, @@ -125,7 +125,7 @@ This is a Razor document. { Uri = FileUri("File1.razor.g.html") }, - Edits = [VsLspFactory.CreateTextEdit(position: (0, 0), htmlTag)] + Edits = [LspFactory.CreateTextEdit(position: (0, 0), htmlTag)] } } }, diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/Debugging/DefaultRazorBreakpointResolverTest.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/Debugging/DefaultRazorBreakpointResolverTest.cs index f52c195fd07..2011c5e7117 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/Debugging/DefaultRazorBreakpointResolverTest.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/Debugging/DefaultRazorBreakpointResolverTest.cs @@ -132,7 +132,7 @@ public async Task TryResolveBreakpointRangeAsync_MappableCSharpBreakpointLocatio { // Arrange var hostDocumentPosition = GetPosition(ValidBreakpointCSharp, _hostTextbuffer); - var hostBreakpointRange = VsLspFactory.CreateSingleLineRange(start: hostDocumentPosition, length: ValidBreakpointCSharp.Length); + var hostBreakpointRange = LspFactory.CreateSingleLineRange(start: hostDocumentPosition, length: ValidBreakpointCSharp.Length); var projectionProvider = new TestLSPBreakpointSpanProvider( _documentUri, new Dictionary() @@ -183,6 +183,6 @@ private static Position GetPosition(string content, ITextBuffer textBuffer) } var line = textBuffer.CurrentSnapshot.GetLineFromPosition(index); - return VsLspFactory.CreatePosition(line.LineNumber, index - line.Start.Position); + return LspFactory.CreatePosition(line.LineNumber, index - line.Start.Position); } } diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/DocumentMapping/DefaultLSPDocumentMappingProviderTest.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/DocumentMapping/DefaultLSPDocumentMappingProviderTest.cs index 0efc73d8dbf..742509d06af 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/DocumentMapping/DefaultLSPDocumentMappingProviderTest.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/DocumentMapping/DefaultLSPDocumentMappingProviderTest.cs @@ -47,7 +47,7 @@ public async Task RazorMapToDocumentRangeAsync_InvokesLanguageServer() var response = new RazorMapToDocumentRangesResponse() { - Ranges = [VsLspFactory.CreateRange(1, 1, 3, 3)], + Ranges = [LspFactory.CreateRange(1, 1, 3, 3)], HostDocumentVersion = 1 }; var requestInvoker = new Mock(MockBehavior.Strict); @@ -61,7 +61,7 @@ public async Task RazorMapToDocumentRangeAsync_InvokesLanguageServer() .ReturnsAsync(new ReinvocationResponse("TestLanguageClient", response)); var mappingProvider = new DefaultLSPDocumentMappingProvider(requestInvoker.Object, _documentManager); - var projectedRange = VsLspFactory.CreateRange(10, 10, 15, 15); + var projectedRange = LspFactory.CreateRange(10, 10, 15, 15); // Act var result = await mappingProvider.MapToDocumentRangesAsync(RazorLanguageKind.CSharp, uri, new[] { projectedRange }, DisposalToken); @@ -70,7 +70,7 @@ public async Task RazorMapToDocumentRangeAsync_InvokesLanguageServer() Assert.NotNull(result); Assert.Equal(1, result.HostDocumentVersion); var actualRange = result.Ranges[0]; - Assert.Equal(VsLspFactory.CreatePosition(1, 1), actualRange.Start); - Assert.Equal(VsLspFactory.CreatePosition(3, 3), actualRange.End); + Assert.Equal(LspFactory.CreatePosition(1, 1), actualRange.Start); + Assert.Equal(LspFactory.CreatePosition(3, 3), actualRange.End); } } diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/RazorCustomMessageTargetTest.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/RazorCustomMessageTargetTest.cs index 99132c4935c..419fa70db8a 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/RazorCustomMessageTargetTest.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/RazorCustomMessageTargetTest.cs @@ -214,7 +214,7 @@ public async Task ProvideCodeActionsAsync_CannotLookupDocument_ReturnsNullAsync( { Uri = new Uri("C:/path/to/file.razor") }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() } }; @@ -295,7 +295,7 @@ async IAsyncEnumerable> { Uri = testDocUri }, - Range = VsLspFactory.DefaultRange, + Range = LspFactory.DefaultRange, Context = new VSInternalCodeActionContext() } }; @@ -420,7 +420,7 @@ public async Task ProvideSemanticTokensAsync_CannotLookupDocument_ReturnsNullAsy Uri = new Uri("C:/path/to/file.razor") }, requiredHostDocumentVersion: 1, - ranges: [VsLspFactory.DefaultRange], + ranges: [LspFactory.DefaultRange], correlationId: Guid.Empty); // Act @@ -469,7 +469,7 @@ public async Task ProvideSemanticTokensAsync_CannotLookupVirtualDocument_Returns Uri = new Uri("C:/path/to/file.razor") }, requiredHostDocumentVersion: 0, - ranges: [VsLspFactory.DefaultRange], + ranges: [LspFactory.DefaultRange], correlationId: Guid.Empty); // Act @@ -546,7 +546,7 @@ public async Task ProvideSemanticTokensAsync_ContainsRange_ReturnsSemanticTokens Uri = new Uri("C:/path/to%20-%20project/file.razor") }, requiredHostDocumentVersion: 0, - ranges: [VsLspFactory.DefaultRange], + ranges: [LspFactory.DefaultRange], correlationId: Guid.Empty); // Act @@ -624,7 +624,7 @@ public async Task ProvideSemanticTokensAsync_EmptyRange_ReturnsNoSemanticTokens( Uri = new Uri("C:/path/to%20-%20project/file.razor") }, requiredHostDocumentVersion: 0, - ranges: [VsLspFactory.DefaultRange], + ranges: [LspFactory.DefaultRange], correlationId: Guid.Empty); var expectedResults = new ProvideSemanticTokensResponse(null, documentVersion); diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/RazorLSPSpanMappingServiceTest.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/RazorLSPSpanMappingServiceTest.cs index cae25378834..d2b8d278c79 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/RazorLSPSpanMappingServiceTest.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/RazorLSPSpanMappingServiceTest.cs @@ -64,7 +64,7 @@ public async Task MapSpans_WithinRange_ReturnsMapping() var textSnapshot = new StringTextSnapshot(s_mockGeneratedContent, 1); var textSpanAsRange = _sourceTextGenerated.GetRange(textSpan); - var mappedRange = VsLspFactory.CreateSingleLineRange(2, character: 1, length: 10); + var mappedRange = LspFactory.CreateSingleLineRange(2, character: 1, length: 10); var documentMappingProvider = new Mock(MockBehavior.Strict); var mappingResult = new RazorMapToDocumentRangesResponse() @@ -138,7 +138,7 @@ public void MapSpans_GetMappedSpanResults_MappingErrorReturnsDefaultMappedSpan() { // Arrange var sourceTextRazor = SourceText.From(""); - var response = new RazorMapToDocumentRangesResponse { Ranges = new Range[] { VsLspFactory.UndefinedRange } }; + var response = new RazorMapToDocumentRangesResponse { Ranges = new Range[] { LspFactory.UndefinedRange } }; // Act var results = RazorLSPSpanMappingService.GetMappedSpanResults(_mockDocumentUri.LocalPath, sourceTextRazor, response); diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/TestDocumentManager.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/TestDocumentManager.cs index 9637feecd45..9c3a2717d15 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/TestDocumentManager.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/TestDocumentManager.cs @@ -73,7 +73,7 @@ private void UpdateCSharpServerDocument(IReadOnlyList changes, Virt var rangesAndTexts = changes.Select(c => { GetLinesAndOffsets(virtualSourceText, c.OldSpan, out var startLine, out var startCharacter, out var endLine, out var endCharacter); - var range = VsLspFactory.CreateRange(startLine, startCharacter, endLine, endCharacter); + var range = LspFactory.CreateRange(startLine, startCharacter, endLine, endCharacter); return (range, c.NewText); }).ToArray(); diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/RazorLanguageService_IVsLanguageDebugInfoTest.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/RazorLanguageService_IVsLanguageDebugInfoTest.cs index 4dd8aa8e590..45058bebe8d 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/RazorLanguageService_IVsLanguageDebugInfoTest.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/RazorLanguageService_IVsLanguageDebugInfoTest.cs @@ -69,7 +69,7 @@ public void ValidateBreakpointLocation_NullBreakpointRange_ReturnsEFail() public void ValidateBreakpointLocation_ValidBreakpointRange_ReturnsSOK() { // Arrange - var breakpointRange = VsLspFactory.CreateRange(2, 4, 3, 5); + var breakpointRange = LspFactory.CreateRange(2, 4, 3, 5); var breakpointResolver = Mock.Of(resolver => resolver.TryResolveBreakpointRangeAsync(It.IsAny(), 0, 0, It.IsAny()) == System.Threading.Tasks.Task.FromResult(breakpointRange), MockBehavior.Strict); var languageService = CreateLanguageServiceWith(breakpointResolver); From 27c038c1e399bd4297d7787d9cdc37b278ff3768 Mon Sep 17 00:00:00 2001 From: David Wengier Date: Tue, 30 Jul 2024 11:31:54 +1000 Subject: [PATCH 04/20] Change all Range aliases to LspRange aliases This is to make things easier in future, as we'll be getting a global using for all protocol types --- .../LanguageServer/RazorCodeActionsBenchmark.cs | 8 ++++---- .../LanguageServer/RazorDiagnosticsBenchmark.cs | 14 +++++++------- .../LanguageServer/RazorSemanticTokensBenchmark.cs | 4 ++-- .../RazorSemanticTokensRangeEndpointBenchmark.cs | 4 ++-- .../RazorSemanticTokensScrollingBenchmark.cs | 4 ++-- .../Definition/DefinitionEndpoint.cs | 6 +++--- .../Diagnostics/RazorDiagnosticConverter.cs | 4 ++-- .../RazorTranslateDiagnosticsService.cs | 6 +++--- .../Formatting/CSharpFormatter.cs | 6 +++--- .../Formatting/CSharpFormattingPassBase.cs | 4 ++-- .../Formatting/CSharpOnTypeFormattingPass.cs | 8 ++++---- .../Formatting/RazorFormattingService.cs | 4 ++-- .../Hover/HoverService.cs | 6 +++--- .../Mapping/RazorMapToDocumentRangesEndpoint.cs | 4 ++-- .../Services/LSPCSharpSemanticTokensProvider.cs | 4 ++-- .../IRazorDocumentMappingServiceExtensions.cs | 10 +++++----- .../RazorMapToDocumentRangesParams.cs | 4 ++-- .../ProvideSemanticTokensRangesParams.cs | 6 +++--- .../Debugging/RazorBreakpointResolver.cs | 4 ++-- .../Debugging/DefaultLSPBreakpointSpanProvider.cs | 4 ++-- .../Debugging/DefaultRazorBreakpointResolver.cs | 8 ++++---- .../DefaultLSPDocumentMappingProvider.cs | 4 ++-- .../DocumentMapping/LSPDocumentMappingProvider.cs | 4 ++-- .../ValidateBreakpointRangeEndpointTest.cs | 4 ++-- .../FormattingLanguageServerTestBase.cs | 4 ++-- ...elegatingEndpointTestBase.TestLanguageServer.cs | 6 +++--- .../LanguageServer/CSharpTestLspServer.cs | 6 +++--- .../DefaultRazorBreakpointResolverTest.cs | 4 ++-- .../Debugging/TestLSPBreakpointSpanProvider.cs | 12 ++++++------ .../RazorLSPSpanMappingServiceTest.cs | 12 ++++++------ 30 files changed, 89 insertions(+), 89 deletions(-) diff --git a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorCodeActionsBenchmark.cs b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorCodeActionsBenchmark.cs index 8f8a680ae8f..2f76d296831 100644 --- a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorCodeActionsBenchmark.cs +++ b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorCodeActionsBenchmark.cs @@ -20,7 +20,7 @@ using Microsoft.CodeAnalysis.Text; using Microsoft.CommonLanguageServerProtocol.Framework; using Microsoft.VisualStudio.LanguageServer.Protocol; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.Microbenchmarks.LanguageServer; @@ -31,9 +31,9 @@ public class RazorCodeActionsBenchmark : RazorLanguageServerBenchmarkBase private CodeActionEndpoint? CodeActionEndpoint { get; set; } private IDocumentSnapshot? DocumentSnapshot { get; set; } private SourceText? DocumentText { get; set; } - private Range? RazorCodeActionRange { get; set; } - private Range? CSharpCodeActionRange { get; set; } - private Range? HtmlCodeActionRange { get; set; } + private LspRange? RazorCodeActionRange { get; set; } + private LspRange? CSharpCodeActionRange { get; set; } + private LspRange? HtmlCodeActionRange { get; set; } private RazorRequestContext RazorRequestContext { get; set; } public enum FileTypes diff --git a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorDiagnosticsBenchmark.cs b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorDiagnosticsBenchmark.cs index f1878b7f567..24444f16bdf 100644 --- a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorDiagnosticsBenchmark.cs +++ b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorDiagnosticsBenchmark.cs @@ -22,7 +22,7 @@ using Microsoft.CodeAnalysis.Text; using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.Microbenchmarks.LanguageServer; @@ -119,27 +119,27 @@ private IRazorDocumentMappingService BuildRazorDocumentMappingService() { var razorDocumentMappingService = new Mock(MockBehavior.Strict); - Range? hostDocumentRange; + LspRange? hostDocumentRange; razorDocumentMappingService.Setup( r => r.TryMapToHostDocumentRange( It.IsAny(), InRange, It.IsAny(), out hostDocumentRange)) - .Returns((IRazorGeneratedDocument generatedDocument, Range range, MappingBehavior mappingBehavior, out Range? actualOutRange) => + .Returns((IRazorGeneratedDocument generatedDocument, LspRange range, MappingBehavior mappingBehavior, out LspRange? actualOutRange) => { actualOutRange = OutRange; return true; }); - Range? hostDocumentRange2; + LspRange? hostDocumentRange2; razorDocumentMappingService.Setup( r => r.TryMapToHostDocumentRange( It.IsAny(), It.IsNotIn(InRange), It.IsAny(), out hostDocumentRange2)) - .Returns((IRazorGeneratedDocument generatedDocument, Range range, MappingBehavior mappingBehavior, out Range? actualOutRange) => + .Returns((IRazorGeneratedDocument generatedDocument, LspRange range, MappingBehavior mappingBehavior, out LspRange? actualOutRange) => { actualOutRange = null; return false; @@ -207,8 +207,8 @@ public Task SendRequestAsync(string method, TPara } } - private Range InRange { get; set; } = LspFactory.CreateSingleLineRange(line: 85, character: 8, length: 8); - private Range OutRange { get; set; } = LspFactory.CreateSingleLineRange(line: 6, character: 8, length: 8); + private LspRange InRange { get; set; } = LspFactory.CreateSingleLineRange(line: 85, character: 8, length: 8); + private LspRange OutRange { get; set; } = LspFactory.CreateSingleLineRange(line: 6, character: 8, length: 8); private Diagnostic[] GetDiagnostics(int n) => Enumerable.Range(1, n).Select(_ => new Diagnostic() { diff --git a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensBenchmark.cs b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensBenchmark.cs index 2c5dd603ac1..fa61204cb93 100644 --- a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensBenchmark.cs +++ b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensBenchmark.cs @@ -20,7 +20,7 @@ using Microsoft.CodeAnalysis.Text; using Microsoft.Extensions.DependencyInjection; using Microsoft.VisualStudio.LanguageServer.Protocol; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.Microbenchmarks.LanguageServer; @@ -36,7 +36,7 @@ public class RazorSemanticTokensBenchmark : RazorLanguageServerBenchmarkBase private VersionedDocumentContext DocumentContext { get; set; } - private Range Range { get; set; } + private LspRange Range { get; set; } private string PagesDirectory { get; set; } diff --git a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensRangeEndpointBenchmark.cs b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensRangeEndpointBenchmark.cs index 4f30af12f11..a30a3828c86 100644 --- a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensRangeEndpointBenchmark.cs +++ b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensRangeEndpointBenchmark.cs @@ -22,7 +22,7 @@ using Microsoft.CommonLanguageServerProtocol.Framework; using Microsoft.Extensions.DependencyInjection; using Microsoft.VisualStudio.LanguageServer.Protocol; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.Microbenchmarks.LanguageServer; @@ -40,7 +40,7 @@ public class RazorSemanticTokensRangeEndpointBenchmark : RazorLanguageServerBenc private VersionedDocumentContext DocumentContext { get; set; } - private Range Range { get; set; } + private LspRange Range { get; set; } private string PagesDirectory { get; set; } diff --git a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensScrollingBenchmark.cs b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensScrollingBenchmark.cs index f08d37cbf34..be37d59ac3c 100644 --- a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensScrollingBenchmark.cs +++ b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensScrollingBenchmark.cs @@ -15,7 +15,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.VisualStudio.LanguageServer.Protocol; using static Microsoft.AspNetCore.Razor.Microbenchmarks.LanguageServer.RazorSemanticTokensBenchmark; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.Microbenchmarks.LanguageServer; @@ -31,7 +31,7 @@ public class RazorSemanticTokensScrollingBenchmark : RazorLanguageServerBenchmar private IDocumentSnapshot DocumentSnapshot => DocumentContext.Snapshot; - private Range Range { get; set; } + private LspRange Range { get; set; } private string PagesDirectory { get; set; } diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Definition/DefinitionEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Definition/DefinitionEndpoint.cs index c772aff6175..41ef8c1ecf2 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Definition/DefinitionEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Definition/DefinitionEndpoint.cs @@ -22,7 +22,7 @@ Microsoft.VisualStudio.LanguageServer.Protocol.VSInternalLocation, Microsoft.VisualStudio.LanguageServer.Protocol.VSInternalLocation[], Microsoft.VisualStudio.LanguageServer.Protocol.DocumentLink[]>; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; using SyntaxKind = Microsoft.AspNetCore.Razor.Language.SyntaxKind; namespace Microsoft.AspNetCore.Razor.LanguageServer.Definition; @@ -245,7 +245,7 @@ public void ApplyCapabilities(VSInternalServerCapabilities serverCapabilities, V }; } - private async Task GetNavigateRangeAsync(IDocumentSnapshot documentSnapshot, BoundAttributeDescriptor? attributeDescriptor, CancellationToken cancellationToken) + private async Task GetNavigateRangeAsync(IDocumentSnapshot documentSnapshot, BoundAttributeDescriptor? attributeDescriptor, CancellationToken cancellationToken) { if (attributeDescriptor is not null) { @@ -267,7 +267,7 @@ private async Task GetNavigateRangeAsync(IDocumentSnapshot documentSnapsh return LspFactory.DefaultRange; } - internal static async Task TryGetPropertyRangeAsync(RazorCodeDocument codeDocument, string propertyName, IRazorDocumentMappingService documentMappingService, ILogger logger, CancellationToken cancellationToken) + internal static async Task TryGetPropertyRangeAsync(RazorCodeDocument codeDocument, string propertyName, IRazorDocumentMappingService documentMappingService, ILogger logger, CancellationToken cancellationToken) { // Parse the C# file and find the property that matches the name. // We don't worry about parameter attributes here for two main reasons: diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorDiagnosticConverter.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorDiagnosticConverter.cs index 1ee9556ff92..ce6dd366ab9 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorDiagnosticConverter.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorDiagnosticConverter.cs @@ -8,7 +8,7 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Text; using Microsoft.VisualStudio.LanguageServer.Protocol; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.LanguageServer.Diagnostics; @@ -71,7 +71,7 @@ internal static DiagnosticSeverity ConvertSeverity(RazorDiagnosticSeverity sever } // Internal for testing - internal static Range? ConvertSpanToRange(SourceSpan sourceSpan, SourceText sourceText) + internal static LspRange? ConvertSpanToRange(SourceSpan sourceSpan, SourceText sourceText) { if (sourceSpan == SourceSpan.Undefined) { diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorTranslateDiagnosticsService.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorTranslateDiagnosticsService.cs index 7107ff409a0..bb851658894 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorTranslateDiagnosticsService.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorTranslateDiagnosticsService.cs @@ -19,7 +19,7 @@ using Microsoft.VisualStudio.LanguageServer.Protocol; using Diagnostic = Microsoft.VisualStudio.LanguageServer.Protocol.Diagnostic; using DiagnosticSeverity = Microsoft.VisualStudio.LanguageServer.Protocol.DiagnosticSeverity; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; using SyntaxNode = Microsoft.AspNetCore.Razor.Language.Syntax.SyntaxNode; namespace Microsoft.AspNetCore.Razor.LanguageServer.Diagnostics; @@ -446,7 +446,7 @@ internal virtual bool CheckIfDocumentHasRazorDiagnostic(RazorCodeDocument codeDo return codeDocument.GetSyntaxTree().Diagnostics.Any(d => d.Id.Equals(razorDiagnosticCode, StringComparison.Ordinal)); } - private bool TryGetOriginalDiagnosticRange(Diagnostic diagnostic, RazorCodeDocument codeDocument, SourceText sourceText, [NotNullWhen(true)] out Range? originalRange) + private bool TryGetOriginalDiagnosticRange(Diagnostic diagnostic, RazorCodeDocument codeDocument, SourceText sourceText, [NotNullWhen(true)] out LspRange? originalRange) { if (IsRudeEditDiagnostic(diagnostic)) { @@ -487,7 +487,7 @@ private static bool IsRudeEditDiagnostic(Diagnostic diagnostic) str.StartsWith("ENC"); } - private bool TryRemapRudeEditRange(Range diagnosticRange, RazorCodeDocument codeDocument, SourceText sourceText, [NotNullWhen(true)] out Range? remappedRange) + private bool TryRemapRudeEditRange(LspRange diagnosticRange, RazorCodeDocument codeDocument, SourceText sourceText, [NotNullWhen(true)] out LspRange? remappedRange) { // This is a rude edit diagnostic that has already been mapped to the Razor document. The mapping isn't absolutely correct though, // it's based on the runtime code generation of the Razor document therefore we need to re-map the already mapped diagnostic in a diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpFormatter.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpFormatter.cs index 47089246f24..88b790cac64 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpFormatter.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpFormatter.cs @@ -15,7 +15,7 @@ using Microsoft.CodeAnalysis.Razor.DocumentMapping; using Microsoft.CodeAnalysis.Text; using Microsoft.VisualStudio.LanguageServer.Protocol; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting; @@ -25,7 +25,7 @@ internal sealed class CSharpFormatter(IRazorDocumentMappingService documentMappi private readonly IRazorDocumentMappingService _documentMappingService = documentMappingService; - public async Task FormatAsync(FormattingContext context, Range rangeToFormat, CancellationToken cancellationToken) + public async Task FormatAsync(FormattingContext context, LspRange rangeToFormat, CancellationToken cancellationToken) { if (context is null) { @@ -77,7 +77,7 @@ private TextEdit[] MapEditsToHostDocument(RazorCodeDocument codeDocument, TextEd return actualEdits; } - private static async Task GetFormattingEditsAsync(FormattingContext context, Range projectedRange, CancellationToken cancellationToken) + private static async Task GetFormattingEditsAsync(FormattingContext context, LspRange projectedRange, CancellationToken cancellationToken) { var csharpSourceText = context.CodeDocument.GetCSharpSourceText(); var spanToFormat = csharpSourceText.GetTextSpan(projectedRange); diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpFormattingPassBase.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpFormattingPassBase.cs index ab97332f801..098e56d3a77 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpFormattingPassBase.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpFormattingPassBase.cs @@ -14,7 +14,7 @@ using Microsoft.CodeAnalysis.Razor.DocumentMapping; using Microsoft.CodeAnalysis.Text; using Microsoft.VisualStudio.LanguageServer.Protocol; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting; @@ -30,7 +30,7 @@ protected CSharpFormattingPassBase(IRazorDocumentMappingService documentMappingS public override bool IsValidationPass => false; - protected async Task> AdjustIndentationAsync(FormattingContext context, CancellationToken cancellationToken, Range? range = null) + protected async Task> AdjustIndentationAsync(FormattingContext context, CancellationToken cancellationToken, LspRange? range = null) { // In this method, the goal is to make final adjustments to the indentation of each line. // We will take into account the following, diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpOnTypeFormattingPass.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpOnTypeFormattingPass.cs index 029d4abade1..2c2d6677dae 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpOnTypeFormattingPass.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpOnTypeFormattingPass.cs @@ -20,7 +20,7 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Text; using Microsoft.VisualStudio.LanguageServer.Protocol; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; using SyntaxNode = Microsoft.AspNetCore.Razor.Language.Syntax.SyntaxNode; namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting; @@ -280,7 +280,7 @@ private static int LineDelta(SourceText text, IEnumerable changes, o return delta; } - private static List CleanupDocument(FormattingContext context, Range? range = null) + private static List CleanupDocument(FormattingContext context, LspRange? range = null) { var text = context.SourceText; range ??= text.GetRange(TextSpan.FromBounds(0, text.Length)); @@ -305,7 +305,7 @@ private static List CleanupDocument(FormattingContext context, Range return changes; } - private static void CleanupSourceMappingStart(FormattingContext context, Range sourceMappingRange, List changes, out bool newLineAdded) + private static void CleanupSourceMappingStart(FormattingContext context, LspRange sourceMappingRange, List changes, out bool newLineAdded) { newLineAdded = false; @@ -428,7 +428,7 @@ private static string PrependLines(string text, string newLine, int count) return builder.ToString(); } - private static void CleanupSourceMappingEnd(FormattingContext context, Range sourceMappingRange, List changes, bool newLineWasAddedAtStart) + private static void CleanupSourceMappingEnd(FormattingContext context, LspRange sourceMappingRange, List changes, bool newLineWasAddedAtStart) { // // We look through every source mapping that intersects with the affected range and diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/RazorFormattingService.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/RazorFormattingService.cs index 007250d2bdd..89f49f0bf5e 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/RazorFormattingService.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/RazorFormattingService.cs @@ -13,7 +13,7 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Text; using Microsoft.VisualStudio.LanguageServer.Protocol; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting; @@ -37,7 +37,7 @@ public RazorFormattingService( public async Task FormatAsync( VersionedDocumentContext documentContext, - Range? range, + LspRange? range, FormattingOptions options, CancellationToken cancellationToken) { diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/HoverService.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/HoverService.cs index fe063b11312..218e474e2a2 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/HoverService.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/HoverService.cs @@ -20,7 +20,7 @@ using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Text.Adornments; using MarkupKind = Microsoft.VisualStudio.LanguageServer.Protocol.MarkupKind; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.LanguageServer.Hover; @@ -249,7 +249,7 @@ internal sealed partial class HoverService( return null; } - private VSInternalHover? AttributeInfoToHover(ImmutableArray boundAttributes, Range range, string attributeName, VSInternalClientCapabilities clientCapabilities) + private VSInternalHover? AttributeInfoToHover(ImmutableArray boundAttributes, LspRange range, string attributeName, VSInternalClientCapabilities clientCapabilities) { var descriptionInfos = boundAttributes.SelectAsArray(boundAttribute => { @@ -296,7 +296,7 @@ internal sealed partial class HoverService( } } - private async Task ElementInfoToHoverAsync(string documentFilePath, IEnumerable descriptors, Range range, VSInternalClientCapabilities clientCapabilities, CancellationToken cancellationToken) + private async Task ElementInfoToHoverAsync(string documentFilePath, IEnumerable descriptors, LspRange range, VSInternalClientCapabilities clientCapabilities, CancellationToken cancellationToken) { var descriptionInfos = descriptors.SelectAsArray(BoundElementDescriptionInfo.From); var elementDescriptionInfo = new AggregateBoundElementDescription(descriptionInfos); diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Mapping/RazorMapToDocumentRangesEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Mapping/RazorMapToDocumentRangesEndpoint.cs index 3bd789f83bb..1ab59705e3f 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Mapping/RazorMapToDocumentRangesEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Mapping/RazorMapToDocumentRangesEndpoint.cs @@ -11,7 +11,7 @@ using Microsoft.CodeAnalysis.Razor.Protocol.DocumentMapping; using Microsoft.CommonLanguageServerProtocol.Framework; using Microsoft.VisualStudio.LanguageServer.Protocol; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.LanguageServer.Mapping; @@ -58,7 +58,7 @@ public Uri GetTextDocumentIdentifier(RazorMapToDocumentRangesParams request) } var codeDocument = await documentContext.GetCodeDocumentAsync(cancellationToken).ConfigureAwait(false); - var ranges = new Range[request.ProjectedRanges.Length]; + var ranges = new LspRange[request.ProjectedRanges.Length]; for (var i = 0; i < request.ProjectedRanges.Length; i++) { var projectedRange = request.ProjectedRanges[i]; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Semantic/Services/LSPCSharpSemanticTokensProvider.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Semantic/Services/LSPCSharpSemanticTokensProvider.cs index 641c91c7b92..f507b9104a0 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Semantic/Services/LSPCSharpSemanticTokensProvider.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Semantic/Services/LSPCSharpSemanticTokensProvider.cs @@ -15,7 +15,7 @@ using Microsoft.CodeAnalysis.Razor.Workspaces.Protocol.SemanticTokens; using Microsoft.CodeAnalysis.Text; using Microsoft.VisualStudio.LanguageServer.Protocol; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.LanguageServer.Semantic; @@ -33,7 +33,7 @@ internal class LSPCSharpSemanticTokensProvider(LanguageServerFeatureOptions lang { var documentVersion = documentContext.Version; - using var _ = ListPool.GetPooledObject(out var csharpRangeList); + using var _ = ListPool.GetPooledObject(out var csharpRangeList); foreach (var span in csharpSpans) { csharpRangeList.Add(span.ToRange()); diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentMapping/IRazorDocumentMappingServiceExtensions.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentMapping/IRazorDocumentMappingServiceExtensions.cs index 0fdc80e24b4..13d96a0790e 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentMapping/IRazorDocumentMappingServiceExtensions.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentMapping/IRazorDocumentMappingServiceExtensions.cs @@ -10,7 +10,7 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Text; using Microsoft.VisualStudio.LanguageServer.Protocol; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.CodeAnalysis.Razor.DocumentMapping; @@ -19,7 +19,7 @@ internal static class IRazorDocumentMappingServiceExtensions public static bool TryMapToHostDocumentRange(this IRazorDocumentMappingService service, IRazorGeneratedDocument generatedDocument, LinePositionSpan projectedRange, out LinePositionSpan originalRange) => service.TryMapToHostDocumentRange(generatedDocument, projectedRange, MappingBehavior.Strict, out originalRange); - public static bool TryMapToHostDocumentRange(this IRazorDocumentMappingService service, IRazorGeneratedDocument generatedDocument, Range projectedRange, [NotNullWhen(true)] out Range? originalRange) + public static bool TryMapToHostDocumentRange(this IRazorDocumentMappingService service, IRazorGeneratedDocument generatedDocument, LspRange projectedRange, [NotNullWhen(true)] out LspRange? originalRange) => service.TryMapToHostDocumentRange(generatedDocument, projectedRange, MappingBehavior.Strict, out originalRange); public static async Task GetPositionInfoAsync(this IRazorDocumentMappingService service, DocumentContext documentContext, int hostDocumentIndex, CancellationToken cancellationToken) @@ -62,14 +62,14 @@ public static DocumentPositionInfo GetPositionInfo( return new DocumentPositionInfo(languageKind, position, hostDocumentIndex); } - public static bool TryMapToHostDocumentRange(this IRazorDocumentMappingService service, IRazorGeneratedDocument generatedDocument, Range generatedDocumentRange, MappingBehavior mappingBehavior, [NotNullWhen(true)] out Range? hostDocumentRange) + public static bool TryMapToHostDocumentRange(this IRazorDocumentMappingService service, IRazorGeneratedDocument generatedDocument, LspRange generatedDocumentRange, MappingBehavior mappingBehavior, [NotNullWhen(true)] out LspRange? hostDocumentRange) { var result = service.TryMapToHostDocumentRange(generatedDocument, generatedDocumentRange.ToLinePositionSpan(), mappingBehavior, out var hostDocumentLinePositionSpan); hostDocumentRange = result ? hostDocumentLinePositionSpan.ToRange() : null; return result; } - public static bool TryMapToGeneratedDocumentRange(this IRazorDocumentMappingService service, IRazorGeneratedDocument generatedDocument, Range hostDocumentRange, [NotNullWhen(true)] out Range? generatedDocumentRange) + public static bool TryMapToGeneratedDocumentRange(this IRazorDocumentMappingService service, IRazorGeneratedDocument generatedDocument, LspRange hostDocumentRange, [NotNullWhen(true)] out LspRange? generatedDocumentRange) { var result = service.TryMapToGeneratedDocumentRange(generatedDocument, hostDocumentRange.ToLinePositionSpan(), out var generatedDocumentLinePositionSpan); generatedDocumentRange = result ? generatedDocumentLinePositionSpan.ToRange() : null; @@ -102,7 +102,7 @@ public static bool TryMapToGeneratedDocumentOrNextCSharpPosition(this IRazorDocu /// generated document. If the uri passed in is not for a generated document, or the range cannot be mapped /// for some other reason, the original passed in range is returned unchanged. /// - public static async Task<(Uri MappedDocumentUri, Range MappedRange)> MapToHostDocumentUriAndRangeAsync(this IRazorDocumentMappingService service, Uri generatedDocumentUri, Range generatedDocumentRange, CancellationToken cancellationToken) + public static async Task<(Uri MappedDocumentUri, LspRange MappedRange)> MapToHostDocumentUriAndRangeAsync(this IRazorDocumentMappingService service, Uri generatedDocumentUri, LspRange generatedDocumentRange, CancellationToken cancellationToken) { var result = await service.MapToHostDocumentUriAndRangeAsync(generatedDocumentUri, generatedDocumentRange.ToLinePositionSpan(), cancellationToken).ConfigureAwait(false); return (result.MappedDocumentUri, result.MappedRange.ToRange()); diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentMapping/RazorMapToDocumentRangesParams.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentMapping/RazorMapToDocumentRangesParams.cs index cd9b57edc84..d9bc9acc59c 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentMapping/RazorMapToDocumentRangesParams.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentMapping/RazorMapToDocumentRangesParams.cs @@ -4,7 +4,7 @@ using System; using System.Text.Json.Serialization; using Microsoft.CodeAnalysis.Razor.DocumentMapping; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.CodeAnalysis.Razor.Protocol.DocumentMapping; @@ -17,7 +17,7 @@ internal class RazorMapToDocumentRangesParams public required Uri RazorDocumentUri { get; init; } [JsonPropertyName("projectedRanges")] - public required Range[] ProjectedRanges { get; init; } + public required LspRange[] ProjectedRanges { get; init; } [JsonPropertyName("mappingBehavior")] public MappingBehavior MappingBehavior { get; init; } diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/SemanticTokens/ProvideSemanticTokensRangesParams.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/SemanticTokens/ProvideSemanticTokensRangesParams.cs index 73e62bf91db..4a47066f3b8 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/SemanticTokens/ProvideSemanticTokensRangesParams.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/SemanticTokens/ProvideSemanticTokensRangesParams.cs @@ -4,7 +4,7 @@ using System; using System.Text.Json.Serialization; using Microsoft.VisualStudio.LanguageServer.Protocol; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.CodeAnalysis.Razor.Workspaces.Protocol.SemanticTokens; @@ -14,12 +14,12 @@ internal class ProvideSemanticTokensRangesParams : SemanticTokensParams public long RequiredHostDocumentVersion { get; } [JsonPropertyName("ranges")] - public Range[] Ranges { get; } + public LspRange[] Ranges { get; } [JsonPropertyName("correlationId")] public Guid CorrelationId { get; } - public ProvideSemanticTokensRangesParams(TextDocumentIdentifier textDocument, long requiredHostDocumentVersion, Range[] ranges, Guid correlationId) + public ProvideSemanticTokensRangesParams(TextDocumentIdentifier textDocument, long requiredHostDocumentVersion, LspRange[] ranges, Guid correlationId) { TextDocument = textDocument; RequiredHostDocumentVersion = requiredHostDocumentVersion; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/Debugging/RazorBreakpointResolver.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/Debugging/RazorBreakpointResolver.cs index a9dfe15d5bc..b3f61e9e008 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/Debugging/RazorBreakpointResolver.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/Debugging/RazorBreakpointResolver.cs @@ -4,11 +4,11 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.VisualStudio.Text; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.VisualStudio.Razor.Debugging; internal abstract class RazorBreakpointResolver { - public abstract Task TryResolveBreakpointRangeAsync(ITextBuffer textBuffer, int lineIndex, int characterIndex, CancellationToken cancellationToken); + public abstract Task TryResolveBreakpointRangeAsync(ITextBuffer textBuffer, int lineIndex, int characterIndex, CancellationToken cancellationToken); } diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultLSPBreakpointSpanProvider.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultLSPBreakpointSpanProvider.cs index ee9438b506f..0e8a266c328 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultLSPBreakpointSpanProvider.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultLSPBreakpointSpanProvider.cs @@ -10,7 +10,7 @@ using Microsoft.CodeAnalysis.Razor.Protocol.Debugging; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; using Microsoft.VisualStudio.LanguageServer.Protocol; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.VisualStudio.Razor.LanguageClient.Debugging; @@ -29,7 +29,7 @@ public DefaultLSPBreakpointSpanProvider( _logger = loggerFactory.GetOrCreateLogger(); } - public async override Task GetBreakpointSpanAsync(LSPDocumentSnapshot documentSnapshot, Position position, CancellationToken cancellationToken) + public async override Task GetBreakpointSpanAsync(LSPDocumentSnapshot documentSnapshot, Position position, CancellationToken cancellationToken) { if (documentSnapshot is null) { diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultRazorBreakpointResolver.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultRazorBreakpointResolver.cs index 8025c56fb36..690631253fe 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultRazorBreakpointResolver.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultRazorBreakpointResolver.cs @@ -11,7 +11,7 @@ using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.Debugging; using Microsoft.VisualStudio.Text; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.VisualStudio.Razor.LanguageClient.Debugging; @@ -21,7 +21,7 @@ internal class DefaultRazorBreakpointResolver : RazorBreakpointResolver private readonly FileUriProvider _fileUriProvider; private readonly LSPDocumentManager _documentManager; private readonly LSPBreakpointSpanProvider _breakpointSpanProvider; - private readonly MemoryCache _cache; + private readonly MemoryCache _cache; [ImportingConstructor] public DefaultRazorBreakpointResolver( @@ -51,10 +51,10 @@ public DefaultRazorBreakpointResolver( // 4 is a magic number that was determined based on the functionality of VisualStudio. Currently when you set or edit a breakpoint // we get called with two different locations for the same breakpoint. Because of this 2 time call our size must be at least 2, // we grow it to 4 just to be safe for lesser known scenarios. - _cache = new MemoryCache(sizeLimit: 4); + _cache = new MemoryCache(sizeLimit: 4); } - public override async Task TryResolveBreakpointRangeAsync(ITextBuffer textBuffer, int lineIndex, int characterIndex, CancellationToken cancellationToken) + public override async Task TryResolveBreakpointRangeAsync(ITextBuffer textBuffer, int lineIndex, int characterIndex, CancellationToken cancellationToken) { if (textBuffer is null) { diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/DocumentMapping/DefaultLSPDocumentMappingProvider.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/DocumentMapping/DefaultLSPDocumentMappingProvider.cs index caca4cd081d..1663a966be4 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/DocumentMapping/DefaultLSPDocumentMappingProvider.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/DocumentMapping/DefaultLSPDocumentMappingProvider.cs @@ -9,7 +9,7 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.DocumentMapping; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.VisualStudio.Razor.LanguageClient.DocumentMapping; @@ -45,7 +45,7 @@ public DefaultLSPDocumentMappingProvider( public async override Task MapToDocumentRangesAsync( RazorLanguageKind languageKind, Uri razorDocumentUri, - Range[] projectedRanges, + LspRange[] projectedRanges, CancellationToken cancellationToken) { if (razorDocumentUri is null) diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/DocumentMapping/LSPDocumentMappingProvider.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/DocumentMapping/LSPDocumentMappingProvider.cs index 1adeb935106..16e5bf80dd2 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/DocumentMapping/LSPDocumentMappingProvider.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/DocumentMapping/LSPDocumentMappingProvider.cs @@ -6,11 +6,11 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.DocumentMapping; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.VisualStudio.Razor.LanguageClient.DocumentMapping; internal abstract class LSPDocumentMappingProvider { - public abstract Task MapToDocumentRangesAsync(RazorLanguageKind languageKind, Uri razorDocumentUri, Range[] projectedRanges, CancellationToken cancellationToken); + public abstract Task MapToDocumentRangesAsync(RazorLanguageKind languageKind, Uri razorDocumentUri, LspRange[] projectedRanges, CancellationToken cancellationToken); } diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Debugging/ValidateBreakpointRangeEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Debugging/ValidateBreakpointRangeEndpointTest.cs index 1bc93112012..99e05e6190a 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Debugging/ValidateBreakpointRangeEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Debugging/ValidateBreakpointRangeEndpointTest.cs @@ -14,7 +14,7 @@ using Moq; using Xunit; using Xunit.Abstractions; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.LanguageServer.Debugging; @@ -137,7 +137,7 @@ private async Task VerifyBreakpointRangeAsync(string input) Assert.Equal(expectedRange, result); } - private async Task GetBreakpointRangeAsync(RazorCodeDocument codeDocument, string razorFilePath, TextSpan breakpointSpan) + private async Task GetBreakpointRangeAsync(RazorCodeDocument codeDocument, string razorFilePath, TextSpan breakpointSpan) { var languageServer = await CreateLanguageServerAsync(codeDocument, razorFilePath); diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingLanguageServerTestBase.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingLanguageServerTestBase.cs index 25a4ba44e63..95b89f2a2db 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingLanguageServerTestBase.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingLanguageServerTestBase.cs @@ -14,7 +14,7 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit.Abstractions; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting; @@ -37,7 +37,7 @@ internal class DummyRazorFormattingService : IRazorFormattingService { public bool Called { get; private set; } - public Task FormatAsync(VersionedDocumentContext documentContext, Range? range, FormattingOptions options, CancellationToken cancellationToken) + public Task FormatAsync(VersionedDocumentContext documentContext, LspRange? range, FormattingOptions options, CancellationToken cancellationToken) { Called = true; return SpecializedTasks.EmptyArray(); diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/SingleServerDelegatingEndpointTestBase.TestLanguageServer.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/SingleServerDelegatingEndpointTestBase.TestLanguageServer.cs index f8d2fdd96b6..ff1b414a209 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/SingleServerDelegatingEndpointTestBase.TestLanguageServer.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/SingleServerDelegatingEndpointTestBase.TestLanguageServer.cs @@ -22,7 +22,7 @@ using ImplementationResult = Microsoft.VisualStudio.LanguageServer.Protocol.SumType< Microsoft.VisualStudio.LanguageServer.Protocol.Location[], Microsoft.VisualStudio.LanguageServer.Protocol.VSInternalReferenceItem[]>; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.LanguageServer; @@ -340,7 +340,7 @@ public Task SendNotificationAsync(string method, CancellationToken cancellationT throw new NotImplementedException(); } - private Task HandleValidateBreakpointRangeAsync(T @params) + private Task HandleValidateBreakpointRangeAsync(T @params) { var delegatedParams = Assert.IsType(@params); var delegatedRequest = new VSInternalValidateBreakableRangeParams() @@ -353,7 +353,7 @@ private Task HandleValidateBreakpointRangeAsync(T @params) Range = delegatedParams.ProjectedRange, }; - return _csharpServer.ExecuteRequestAsync( + return _csharpServer.ExecuteRequestAsync( VSInternalMethods.TextDocumentValidateBreakableRangeName, delegatedRequest, _cancellationToken); } } diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/CSharpTestLspServer.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/CSharpTestLspServer.cs index 2b20c842cf4..f264cad399e 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/CSharpTestLspServer.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/CSharpTestLspServer.cs @@ -15,7 +15,7 @@ using Microsoft.VisualStudio.LanguageServer.Protocol; using Nerdbank.Streams; using StreamJsonRpc; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.Test.Common.LanguageServer; @@ -174,7 +174,7 @@ static DidOpenTextDocumentParams CreateDidOpenTextDocumentParams(Uri uri, string }; } - public async Task ReplaceTextAsync(Uri documentUri, params (Range Range, string Text)[] changes) + public async Task ReplaceTextAsync(Uri documentUri, params (LspRange Range, string Text)[] changes) { var didChangeParams = CreateDidChangeTextDocumentParams( documentUri, @@ -182,7 +182,7 @@ public async Task ReplaceTextAsync(Uri documentUri, params (Range Range, string await ExecuteRequestAsync(Methods.TextDocumentDidChangeName, didChangeParams, _cancellationToken); - static DidChangeTextDocumentParams CreateDidChangeTextDocumentParams(Uri documentUri, ImmutableArray<(Range Range, string Text)> changes) + static DidChangeTextDocumentParams CreateDidChangeTextDocumentParams(Uri documentUri, ImmutableArray<(LspRange Range, string Text)> changes) { var changeEvents = changes.Select(change => new TextDocumentContentChangeEvent { diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/Debugging/DefaultRazorBreakpointResolverTest.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/Debugging/DefaultRazorBreakpointResolverTest.cs index 2011c5e7117..fac2bc3b725 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/Debugging/DefaultRazorBreakpointResolverTest.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/Debugging/DefaultRazorBreakpointResolverTest.cs @@ -15,7 +15,7 @@ using Moq; using Xunit; using Xunit.Abstractions; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.VisualStudio.Razor.LanguageClient.Debugging; @@ -135,7 +135,7 @@ public async Task TryResolveBreakpointRangeAsync_MappableCSharpBreakpointLocatio var hostBreakpointRange = LspFactory.CreateSingleLineRange(start: hostDocumentPosition, length: ValidBreakpointCSharp.Length); var projectionProvider = new TestLSPBreakpointSpanProvider( _documentUri, - new Dictionary() + new Dictionary() { [hostDocumentPosition] = hostBreakpointRange }); diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/Debugging/TestLSPBreakpointSpanProvider.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/Debugging/TestLSPBreakpointSpanProvider.cs index b594365bdd2..d3d3e64669f 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/Debugging/TestLSPBreakpointSpanProvider.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/Debugging/TestLSPBreakpointSpanProvider.cs @@ -11,16 +11,16 @@ using Microsoft.AspNetCore.Razor.Threading; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; using Microsoft.VisualStudio.LanguageServer.Protocol; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.VisualStudio.Razor.LanguageClient.Debugging; internal class TestLSPBreakpointSpanProvider : LSPBreakpointSpanProvider { private readonly Uri _documentUri; - private readonly IReadOnlyDictionary _mappings; + private readonly IReadOnlyDictionary _mappings; - public TestLSPBreakpointSpanProvider(Uri documentUri, IReadOnlyDictionary mappings) + public TestLSPBreakpointSpanProvider(Uri documentUri, IReadOnlyDictionary mappings) { if (documentUri is null) { @@ -36,11 +36,11 @@ public TestLSPBreakpointSpanProvider(Uri documentUri, IReadOnlyDictionary GetBreakpointSpanAsync(LSPDocumentSnapshot documentSnapshot, Position position, CancellationToken cancellationToken) + public override Task GetBreakpointSpanAsync(LSPDocumentSnapshot documentSnapshot, Position position, CancellationToken cancellationToken) { if (documentSnapshot.Uri != _documentUri) { - return SpecializedTasks.Null(); + return SpecializedTasks.Null(); } foreach (var mapping in _mappings.OrderBy(d => d.Key)) @@ -52,6 +52,6 @@ public override Task GetBreakpointSpanAsync(LSPDocumentSnapshot documentS } } - return SpecializedTasks.Null(); + return SpecializedTasks.Null(); } } diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/RazorLSPSpanMappingServiceTest.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/RazorLSPSpanMappingServiceTest.cs index d2b8d278c79..639a3f16a58 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/RazorLSPSpanMappingServiceTest.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/RazorLSPSpanMappingServiceTest.cs @@ -18,7 +18,7 @@ using Moq; using Xunit; using Xunit.Abstractions; -using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.VisualStudio.Razor.LanguageClient; @@ -71,8 +71,8 @@ public async Task MapSpans_WithinRange_ReturnsMapping() { Ranges = [mappedRange] }; - documentMappingProvider.Setup(dmp => dmp.MapToDocumentRangesAsync(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) - .Callback((languageKind, uri, ranges, ct) => + documentMappingProvider.Setup(dmp => dmp.MapToDocumentRangesAsync(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) + .Callback((languageKind, uri, ranges, ct) => { Assert.Equal(RazorLanguageKind.CSharp, languageKind); Assert.Equal(_mockDocumentUri, uri); @@ -113,8 +113,8 @@ public async Task MapSpans_OutsideRange_ReturnsEmpty() var textSpanAsRange = _sourceTextGenerated.GetRange(textSpan); var documentMappingProvider = new Mock(MockBehavior.Strict); - documentMappingProvider.Setup(dmp => dmp.MapToDocumentRangesAsync(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) - .Callback((languageKind, uri, ranges, ct) => + documentMappingProvider.Setup(dmp => dmp.MapToDocumentRangesAsync(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) + .Callback((languageKind, uri, ranges, ct) => { Assert.Equal(RazorLanguageKind.CSharp, languageKind); Assert.Equal(_mockDocumentUri, uri); @@ -138,7 +138,7 @@ public void MapSpans_GetMappedSpanResults_MappingErrorReturnsDefaultMappedSpan() { // Arrange var sourceTextRazor = SourceText.From(""); - var response = new RazorMapToDocumentRangesResponse { Ranges = new Range[] { LspFactory.UndefinedRange } }; + var response = new RazorMapToDocumentRangesResponse { Ranges = new LspRange[] { LspFactory.UndefinedRange } }; // Act var results = RazorLSPSpanMappingService.GetMappedSpanResults(_mockDocumentUri.LocalPath, sourceTextRazor, response); From 4c649b28a3ea6b0ec0e97a9e24b2f108555c014c Mon Sep 17 00:00:00 2001 From: David Wengier Date: Tue, 30 Jul 2024 12:08:00 +1000 Subject: [PATCH 05/20] Reference Roslyn protocol library, and deal with the extern alias bits --- Directory.Packages.props | 1 + ...oft.AspNetCore.Razor.Microbenchmarks.csproj | 3 +++ .../GlobalUsings.cs | 18 ++++++++++++++++++ ...soft.AspNetCore.Razor.LanguageServer.csproj | 8 ++++++++ .../GlobalUsings.cs | 16 ++++++++++++++++ ...rosoft.CodeAnalysis.Razor.Workspaces.csproj | 3 --- .../Microsoft.CodeAnalysis.Remote.Razor.csproj | 5 ++--- ....VisualStudio.LanguageServices.Razor.csproj | 4 ++++ ...AspNetCore.Razor.LanguageServer.Test.csproj | 11 +++++++++++ ...AspNetCore.Razor.Test.Common.Tooling.csproj | 3 +++ 10 files changed, 66 insertions(+), 6 deletions(-) create mode 100644 src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/GlobalUsings.cs create mode 100644 src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/GlobalUsings.cs diff --git a/Directory.Packages.props b/Directory.Packages.props index 4e2bdea802f..dc7a59c8505 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -47,6 +47,7 @@ + diff --git a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks.csproj b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks.csproj index 1010350dd29..da4879516d9 100644 --- a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks.csproj +++ b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks.csproj @@ -31,6 +31,7 @@ + TestServices\%(FileName)%(Extension) @@ -54,6 +55,8 @@ + + diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/GlobalUsings.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/GlobalUsings.cs new file mode 100644 index 00000000000..30da818ec34 --- /dev/null +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/GlobalUsings.cs @@ -0,0 +1,18 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the MIT license. See License.txt in the project root for license information. + +// The item doesn't support aliases so we need to define aliased global usings in a .cs file not in the .csproj +// https://github.com/dotnet/sdk/issues/37814 +extern alias RLSP; +global using RLSP::Roslyn.LanguageServer.Protocol; + +// Avoid extern alias in every file that needs to use Range +global using LspRange = RLSP::Roslyn.LanguageServer.Protocol.Range; + +// Avoid ambiguity errors because of our global using above +global using Range = System.Range; + +// We put our extensions on Roslyn's LSP types in the same namespace, for convenience, but of course without the alias, +// so to prevent confusion at not needing a using directive to access types, but needing one for extensions, we just +// global using the our extensions (which of course means they didn't need to be in the same namespace for convenience!) +global using Roslyn.LanguageServer.Protocol; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Microsoft.AspNetCore.Razor.LanguageServer.csproj b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Microsoft.AspNetCore.Razor.LanguageServer.csproj index 8c0b64042b4..e818a269bcb 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Microsoft.AspNetCore.Razor.LanguageServer.csproj +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Microsoft.AspNetCore.Razor.LanguageServer.csproj @@ -26,6 +26,14 @@ + + + + + + diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/Microsoft.AspNetCore.Razor.Test.Common.Tooling.csproj b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/Microsoft.AspNetCore.Razor.Test.Common.Tooling.csproj index 6caeb6b2982..2b56b9591dc 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/Microsoft.AspNetCore.Razor.Test.Common.Tooling.csproj +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/Microsoft.AspNetCore.Razor.Test.Common.Tooling.csproj @@ -14,6 +14,7 @@ + @@ -54,6 +55,8 @@ + + From eb3565c9aeba1c342e2092c221fb3545f4c37ce7 Mon Sep 17 00:00:00 2001 From: David Wengier Date: Tue, 30 Jul 2024 13:21:51 +1000 Subject: [PATCH 06/20] Remove unused usings Not a mechanical commit, but my word is it doing a good job cosplaying as one --- .../LanguageServer/BenchmarkClientCapabilitiesService.cs | 1 - .../LanguageServer/RazorCSharpFormattingBenchmark.cs | 1 - .../LanguageServer/RazorCodeActionsBenchmark.cs | 2 -- .../LanguageServer/RazorCompletionBenchmark.cs | 1 - .../LanguageServer/RazorDiagnosticsBenchmark.cs | 2 -- .../LanguageServer/RazorSemanticTokensBenchmark.cs | 2 -- .../RazorSemanticTokensRangeEndpointBenchmark.cs | 2 -- .../LanguageServer/RazorSemanticTokensScrollingBenchmark.cs | 2 -- .../Serialization/CompletionListSerializationBenchmark.cs | 1 - .../AbstractRazorDelegatingEndpoint.cs | 1 - .../AutoInsert/AutoClosingTagOnAutoInsertProvider.cs | 1 - .../AutoInsert/CloseTextTagOnAutoInsertProvider.cs | 1 - .../AutoInsert/IOnAutoInsertProvider.cs | 1 - .../AutoInsert/OnAutoInsertEndpoint.cs | 1 - .../PreferHtmlInAttributeValuesDocumentPositionStrategy.cs | 1 - .../CapabilitiesManager.cs | 1 - .../ClientConnection.cs | 1 - .../CodeActions/AddUsingsCodeActionProviderHelper.cs | 1 - .../CodeActions/BaseDelegatedCodeActionResolver.cs | 1 - .../CodeActions/CSharp/DefaultCSharpCodeActionResolver.cs | 1 - .../CodeActions/CSharp/TypeAccessibilityCodeActionProvider.cs | 1 - .../CSharp/UnformattedRemappingCSharpCodeActionResolver.cs | 1 - .../CodeActions/CodeActionEndpoint.cs | 1 - .../CodeActions/CodeActionResolveEndpoint.cs | 1 - .../CodeActions/Html/DefaultHtmlCodeActionProvider.cs | 1 - .../CodeActions/Html/DefaultHtmlCodeActionResolver.cs | 1 - .../CodeActions/Models/AddUsingsCodeActionParams.cs | 1 - .../CodeActions/Models/CodeActionExtensions.cs | 1 - .../CodeActions/Models/CodeActionResolveParams.cs | 1 - .../CodeActions/Models/RazorVSInternalCodeAction.cs | 1 - .../CodeActions/Razor/AddUsingsCodeActionResolver.cs | 1 - .../CodeActions/Razor/CodeBlockService.cs | 1 - .../Razor/ComponentAccessibilityCodeActionProvider.cs | 1 - .../CodeActions/Razor/CreateComponentCodeActionResolver.cs | 1 - .../CodeActions/Razor/ExtractToCodeBehindCodeActionResolver.cs | 1 - .../CodeActions/Razor/GenerateMethodCodeActionResolver.cs | 1 - .../CodeActions/Razor/IRazorCodeActionResolver.cs | 1 - .../CodeActions/Razor/RazorCodeActionFactory.cs | 1 - .../ColorPresentation/ColorPresentationEndpoint.cs | 1 - .../Completion/AggregateCompletionItemResolver.cs | 1 - .../Completion/CompletionItemResolver.cs | 1 - .../Completion/CompletionListCache.cs | 1 - .../Completion/CompletionListMerger.cs | 1 - .../Completion/CompletionListOptimizer.cs | 1 - .../Completion/CompletionListProvider.cs | 1 - .../Completion/Delegation/DelegatedCompletionItemResolver.cs | 1 - .../Completion/Delegation/DelegatedCompletionListProvider.cs | 1 - .../Delegation/DelegatedCompletionResponseRewriter.cs | 1 - .../Completion/Delegation/DesignTimeHelperResponseRewriter.cs | 1 - .../Delegation/HtmlCommitCharacterResponseRewriter.cs | 1 - .../Completion/Delegation/SnippetResponseRewriter.cs | 1 - .../Completion/Delegation/TextEditResponseRewriter.cs | 1 - .../Completion/RazorCompletionEndpoint.cs | 1 - .../Completion/RazorCompletionItemResolver.cs | 1 - .../Completion/RazorCompletionListProvider.cs | 1 - .../Completion/RazorCompletionResolveEndpoint.cs | 1 - .../Completion/VSInternalCompletionItemExtensions.cs | 1 - .../Completion/VSInternalCompletionListExtensions.cs | 1 - .../Debugging/RazorBreakpointSpanEndpoint.cs | 1 - .../Debugging/RazorProximityExpressionsEndpoint.cs | 1 - .../Debugging/ValidateBreakpointRangeEndpoint.cs | 1 - .../Debugging/ValidateBreakpointRangeParams.cs | 1 - .../DefaultDocumentPositionInfoStrategy.cs | 1 - .../DefaultRazorConfigurationService.cs | 1 - .../Definition/DefinitionEndpoint.cs | 2 -- .../Diagnostics/DocumentPullDiagnosticsEndpoint.cs | 1 - .../Diagnostics/RazorDiagnosticConverter.cs | 2 -- .../Diagnostics/RazorDiagnosticsPublisher.TestAccessor.cs | 1 - .../Diagnostics/RazorDiagnosticsPublisher.cs | 1 - .../Diagnostics/RazorTranslateDiagnosticsService.cs | 2 -- .../DocumentColor/DocumentColorEndpoint.cs | 1 - .../DocumentColor/DocumentColorService.cs | 1 - .../DocumentColor/IDocumentColorService.cs | 1 - .../DocumentContextFactory.cs | 1 - .../DocumentHighlighting/DocumentHighlightEndpoint.cs | 1 - .../AbstractTextDocumentPresentationEndpointBase.cs | 1 - .../ITextDocumentTextPresentationHandler.cs | 1 - .../ITextDocumentUriPresentationHandler.cs | 1 - .../TextDocumentTextPresentationEndpoint.cs | 1 - .../TextDocumentUriPresentationEndpoint.cs | 1 - .../DocumentSymbols/DocumentSymbolEndpoint.cs | 1 - .../DocumentSynchronization/DocumentDidChangeEndpoint.cs | 1 - .../DocumentSynchronization/DocumentDidCloseEndpoint.cs | 1 - .../DocumentSynchronization/DocumentDidOpenEndpoint.cs | 1 - .../DocumentSynchronization/DocumentDidSaveEndpoint.cs | 1 - .../EndpointContracts/IDidChangeConfigurationEndpoint.cs | 2 -- .../EndpointContracts/IRazorRequestHandler.cs | 1 - .../Extensions/IServiceCollectionExtensions.cs | 1 - .../FindAllReferences/FindAllReferencesEndpoint.cs | 1 - .../Folding/FoldingRangeEndpoint.cs | 1 - .../Formatting/CSharpFormatter.cs | 2 -- .../Formatting/CSharpFormattingPass.cs | 1 - .../Formatting/CSharpFormattingPassBase.cs | 2 -- .../Formatting/CSharpOnTypeFormattingPass.cs | 2 -- .../Formatting/DocumentFormattingEndpoint.cs | 1 - .../Formatting/DocumentOnTypeFormattingEndpoint.cs | 1 - .../Formatting/DocumentRangeFormattingEndpoint.cs | 1 - .../Formatting/FormattingContentValidationPass.cs | 1 - .../Formatting/FormattingContext.cs | 1 - .../Formatting/FormattingDiagnosticValidationPass.cs | 1 - .../Formatting/FormattingOptionsExtensions.cs | 1 - .../Formatting/FormattingPassBase.cs | 1 - .../Formatting/FormattingResult.cs | 1 - .../Formatting/HtmlFormatter.cs | 1 - .../Formatting/HtmlFormattingPass.cs | 1 - .../Formatting/IRazorFormattingService.cs | 1 - .../Formatting/RazorFormattingPass.cs | 1 - .../Formatting/RazorFormattingService.cs | 2 -- .../GeneratedDocumentPublisher.cs | 1 - .../Hosting/RazorLanguageServerCapability.cs | 1 - .../Hosting/RazorLanguageServerHost.cs | 1 - .../Hosting/VSInternalServerCapabilitiesExtensions.cs | 1 - .../Hover/HoverEndpoint.cs | 1 - .../Hover/HoverService.TestAccessor.cs | 1 - .../Hover/HoverService.cs | 3 --- .../Hover/IHoverService.cs | 1 - .../IDocumentPositionInfoStrategy.cs | 1 - .../IOnInitialized.cs | 1 - .../Implementation/ImplementationEndpoint.cs | 1 - .../InlayHints/IInlayHintService.cs | 1 - .../InlayHints/InlayHintEndpoint.cs | 1 - .../InlayHints/InlayHintResolveEndpoint.cs | 1 - .../InlayHints/InlayHintService.cs | 1 - .../InlayHints/RazorInlayHintWrapper.cs | 1 - .../InlineCompletion/InlineCompletionEndPoint.cs | 1 - .../LinkedEditingRange/LinkedEditingRangeEndpoint.cs | 1 - .../MapCode/MapCodeEndpoint.cs | 1 - .../MapCode/Mappers/InsertMapper.cs | 1 - .../Mapping/RazorLanguageQueryEndpoint.cs | 1 - .../Mapping/RazorLanguageQueryParams.cs | 1 - .../Mapping/RazorLanguageQueryResponse.cs | 1 - .../Mapping/RazorMapToDocumentRangesEndpoint.cs | 2 -- .../PreferAttributeNameDocumentPositionInfoStrategy.cs | 1 - .../ProjectContexts/ProjectContextsEndpoint.cs | 1 - .../RazorConfigurationEndpoint.cs | 1 - .../RazorInitializeEndpoint.cs | 1 - .../RazorInitializedEndpoint.cs | 1 - .../RazorRequestContextFactory.cs | 1 - .../Refactoring/RenameEndpoint.cs | 1 - .../Semantic/SemanticTokensRangeEndpoint.cs | 1 - .../Semantic/Services/LSPCSharpSemanticTokensProvider.cs | 2 -- .../SignatureHelp/SignatureHelpEndpoint.cs | 1 - .../SpellCheck/DocumentSpellCheckEndpoint.cs | 1 - .../SpellCheck/WorkspaceSpellCheckEndpoint.cs | 1 - .../Tooltip/DefaultLSPTagHelperTooltipFactory.cs | 1 - .../Tooltip/LSPTagHelperTooltipFactory.cs | 1 - .../WorkspaceSemanticTokensRefreshNotifier.cs | 1 - .../WrapWithTag/WrapWithTagEndpoint.cs | 1 - .../WrapWithTag/WrapWithTagParams.cs | 2 -- .../WrapWithTag/WrapWithTagResponse.cs | 1 - .../Microsoft.CodeAnalysis.Razor.Workspaces/DebuggerDisplay.cs | 1 - .../DocumentMapping/AbstractRazorDocumentMappingService.cs | 1 - .../DocumentMapping/DocumentPositionInfo.cs | 1 - .../DocumentMapping/IRazorDocumentMappingService.cs | 1 - .../DocumentMapping/IRazorDocumentMappingServiceExtensions.cs | 2 -- .../FoldingRanges/AbstractSyntaxNodeFoldingProvider.cs | 3 ++- .../FoldingRanges/FoldingRangeService.cs | 1 - .../FoldingRanges/IFoldingRangeService.cs | 1 - .../FoldingRanges/IRazorFoldingRangeProvider.cs | 1 - .../FoldingRanges/RazorFileUsingsFoldingSyntaxWalker.cs | 1 - .../FoldingRanges/UsingsFoldingRangeProvider.cs | 1 - .../ICapabilitiesProvider.cs | 2 -- .../ProjectSystem/DocumentContext.cs | 1 - .../ProjectSystem/IDocumentContextFactory.cs | 1 - .../ProjectSystem/IDocumentContextFactoryExtensions.cs | 1 - .../ProjectSystem/VersionedDocumentContext.cs | 1 - .../Protocol/CodeActions/FormatNewFileParams.cs | 1 - .../Protocol/CodeActions/RazorResolveCodeActionParams.cs | 1 - .../Protocol/CodeActions/SimplifyMethodParams.cs | 1 - .../Protocol/CodeActions/VSCodeActionParams.cs | 1 - .../Protocol/ColorPresentation/ColorPresentation.cs | 1 - .../Protocol/ColorPresentation/ColorPresentationParams.cs | 1 - .../Protocol/ColorPresentation/DelegatedDocumentColorParams.cs | 1 - .../Protocol/Completion/RazorInlineCompletionRequest.cs | 1 - .../Protocol/Debugging/RazorBreakpointSpanParams.cs | 1 - .../Protocol/Debugging/RazorBreakpointSpanResponse.cs | 1 - .../Protocol/Debugging/RazorProximityExpressionsParams.cs | 1 - .../Protocol/DelegatedTypes.cs | 1 - .../Protocol/Diagnostics/RazorPullDiagnosticResponse.cs | 1 - .../Protocol/DocumentHighlight/RemoteDocumentHighlight.cs | 1 - .../Protocol/DocumentMapping/RazorMapToDocumentRangesParams.cs | 1 - .../DocumentMapping/RazorMapToDocumentRangesResponse.cs | 1 - .../Protocol/DocumentPresentation/IPresentationParams.cs | 2 -- .../Protocol/DocumentPresentation/TextPresentationParams.cs | 2 -- .../Protocol/DocumentPresentation/UriPresentationParams.cs | 2 -- .../Protocol/Folding/RazorFoldingRangeRequestParam.cs | 1 - .../Protocol/Folding/RazorFoldingRangeResponse.cs | 1 - .../Protocol/Folding/RemoteFoldingRange.cs | 1 - .../Protocol/Formatting/RazorDocumentFormattingParams.cs | 1 - .../Protocol/Formatting/RazorDocumentFormattingResponse.cs | 1 - .../Protocol/Formatting/RazorDocumentOnTypeFormattingParams.cs | 1 - .../Protocol/IClientCapabilitiesService.cs | 2 -- .../SemanticTokens/ProvideSemanticTokensRangesParams.cs | 2 -- .../Protocol/SemanticTokens/SemanticTokensRangesParams.cs | 1 - .../Protocol/TextDocumentIdentifierAndVersion.cs | 1 - .../Debugging/RazorBreakpointResolver.cs | 1 - .../Cohost/CohostDocumentHighlightPresentationEndpoint.cs | 1 - .../LanguageClient/Cohost/CohostFoldingRangeEndpoint.cs | 1 - .../LanguageClient/Cohost/CohostLinkedEditingRangeEndpoint.cs | 1 - .../LanguageClient/Cohost/CohostSemanticTokensRangeEndpoint.cs | 1 - .../LanguageClient/Cohost/CohostSignatureHelpEndpoint.cs | 1 - .../LanguageClient/Cohost/CohostUriPresentationEndpoint.cs | 1 - .../LanguageClient/Cohost/IDynamicRegistrationProvider.cs | 1 - .../Cohost/RazorCohostClientCapabilitiesService.cs | 1 - .../Cohost/RazorCohostDynamicRegistrationService.cs | 1 - .../Debugging/DefaultLSPBreakpointSpanProvider.cs | 2 -- .../Debugging/DefaultLSPProximityExpressionsProvider.cs | 1 - .../LanguageClient/Debugging/DefaultRazorBreakpointResolver.cs | 2 -- .../Debugging/DefaultRazorProximityExpressionResolver.cs | 1 - .../LanguageClient/Debugging/LSPBreakpointSpanProvider.cs | 1 - .../Debugging/LSPProximityExpressionsProvider.cs | 1 - .../DocumentMapping/DefaultLSPDocumentMappingProvider.cs | 1 - .../DocumentMapping/LSPDocumentMappingProvider.cs | 1 - .../LanguageClient/Endpoints/RazorCustomMessageTarget.cs | 1 - .../Endpoints/RazorCustomMessageTarget_CodeActions.cs | 1 - .../Endpoints/RazorCustomMessageTarget_Completion.cs | 1 - .../Endpoints/RazorCustomMessageTarget_Diagnostics.cs | 1 - .../Endpoints/RazorCustomMessageTarget_DocumentColor.cs | 1 - .../Endpoints/RazorCustomMessageTarget_DocumentSymbol.cs | 1 - .../Endpoints/RazorCustomMessageTarget_FoldingRange.cs | 1 - .../Endpoints/RazorCustomMessageTarget_HtmlFormatting.cs | 1 - .../Endpoints/RazorCustomMessageTarget_InlayHints.cs | 1 - .../Endpoints/RazorCustomMessageTarget_MapCode.cs | 1 - .../Endpoints/RazorCustomMessageTarget_OnAutoInsert.cs | 1 - .../Endpoints/RazorCustomMessageTarget_Presentation.cs | 1 - .../Endpoints/RazorCustomMessageTarget_ProjectContexts.cs | 1 - .../Endpoints/RazorCustomMessageTarget_Rename.cs | 1 - .../Endpoints/RazorCustomMessageTarget_SemanticTokens.cs | 1 - .../Endpoints/RazorCustomMessageTarget_SimplifyMethod.cs | 1 - .../Endpoints/RazorCustomMessageTarget_SpellCheck.cs | 1 - .../Endpoints/RazorCustomMessageTarget_TextDocumentPosition.cs | 1 - .../Endpoints/RazorCustomMessageTarget_ValidateBreakpoint.cs | 1 - .../RazorCustomMessageTarget_WorkspaceConfiguration.cs | 1 - .../Endpoints/RazorCustomMessageTarget_WrapWithTag.cs | 1 - .../LanguageClient/Extensions/TextDocumentExtensions.cs | 1 - .../LanguageClient/RazorCSharpInterceptionMiddleLayer.cs | 1 - .../LanguageClient/RazorLSPSpanMappingService.cs | 1 - .../LanguageClient/WorkspaceConfigurationChangedListener.cs | 1 - .../LanguageClient/WrapWithTag/VSInternalWrapWithTagParams.cs | 1 - .../WrapWithTag/VSInternalWrapWithTagResponse.cs | 1 - .../AutoInsert/OnAutoInsertEndpointTest.NetFx.cs | 1 - .../AutoInsert/OnAutoInsertEndpointTest.cs | 1 - ...ferHtmlInAttributeValuesDocumentPositionInfoStrategyTest.cs | 1 - .../AutoInsert/RazorOnAutoInsertProviderTestBase.cs | 1 - .../CodeActions/AddUsingsCodeActionResolverTest.cs | 1 - .../CodeActions/CSharp/DefaultCSharpCodeActionProviderTest.cs | 1 - .../CodeActions/CSharp/DefaultCSharpCodeActionResolverTest.cs | 1 - .../CSharp/TypeAccessibilityCodeActionProviderTest.cs | 1 - .../CodeActions/CodeActionEndToEndTest.NetFx.cs | 1 - .../CodeActions/CodeActionEndpointTest.cs | 1 - .../CodeActions/CodeActionResolutionEndpointTest.cs | 1 - .../CodeActions/Html/DefaultHtmlCodeActionProviderTest.cs | 1 - .../CodeActions/Html/DefaultHtmlCodeActionResolverTest.cs | 1 - .../Razor/ComponentAccessibilityCodeActionProviderTest.cs | 1 - .../CodeActions/Razor/CreateComponentCodeActionResolverTest.cs | 1 - .../Razor/ExtractToCodeBehindCodeActionProviderTest.cs | 1 - .../Razor/ExtractToCodeBehindCodeActionResolverTest.cs | 1 - .../Completion/CompletionListCacheTest.cs | 1 - .../Completion/CompletionListMergerTest.cs | 1 - .../Completion/CompletionListOptimizerTest.cs | 1 - .../Completion/CompletionListProviderTest.cs | 1 - .../Completion/DefaultLSPTagHelperTooltipFactoryTest.cs | 1 - .../Delegation/DelegatedCompletionItemResolverTest.NetFx.cs | 1 - .../Delegation/DelegatedCompletionListProviderTest.cs | 1 - .../Delegation/DesignTimeHelperResponseRewriterTest.cs | 1 - .../Delegation/HtmlCommitCharacterResponseRewriterTest.cs | 1 - .../Completion/Delegation/ResponseRewriterTestBase.cs | 1 - .../Completion/Delegation/SnippetResponseRewriterTest.cs | 1 - .../Delegation/TestDelegatedCompletionListProvider.cs | 1 - .../Completion/Delegation/TextEditResponseRewriterTest.cs | 1 - .../Completion/DirectiveVerifier.cs | 1 - .../Completion/RazorCompletionEndpointTest.cs | 1 - .../Completion/RazorCompletionItemResolverTest.cs | 1 - .../Completion/RazorCompletionListProviderTest.cs | 1 - .../Completion/RazorCompletionResolveEndpointTest.cs | 1 - .../Completion/TestDocumentMappingService.cs | 1 - .../Debugging/RazorBreakpointSpanEndpointTest.cs | 1 - .../Debugging/RazorProximityExpressionsEndpointTest.cs | 1 - .../Debugging/ValidateBreakpointRangeEndpointTest.cs | 2 -- .../DefaultRazorConfigurationServiceTest.cs | 1 - .../DefaultWorkspaceDirectoryPathResolverTest.cs | 1 - .../Definition/DefinitionEndpointDelegationTest.cs | 1 - .../Definition/DefinitionEndpointTest.cs | 1 - .../Diagnostics/CSharpDiagnosticsEndToEndTest.cs | 1 - .../Diagnostics/DocumentPullDiagnosticsEndpointTest.cs | 1 - .../Diagnostics/RazorDiagnosticConverterTest.cs | 1 - .../Diagnostics/RazorDiagnosticsPublisherTest.cs | 1 - .../DocumentHighlighting/DocumentHighlightEndpointTest.cs | 1 - .../TextDocumentTextPresentationEndpointTests.cs | 1 - .../TextDocumentUriPresentationEndpointTests.cs | 1 - .../DocumentSymbols/DocumentSymbolEndpointTest.cs | 1 - .../DocumentSynchronization/DocumentDidChangeEndpointTest.cs | 1 - .../DocumentSynchronization/DocumentDidCloseEndpointTest.cs | 1 - .../DocumentSynchronization/DocumentDidOpenEndpointTest.cs | 1 - .../FindReferences/FindAllReferencesEndpointTest.cs | 1 - .../Folding/FoldingEndpointTest.cs | 1 - .../Formatting_NetFx/DocumentOnTypeFormattingEndpointTest.cs | 1 - .../Formatting_NetFx/DocumentRangeFormattingEndpointTest.cs | 1 - .../Formatting_NetFx/FormattingContentValidationPassTest.cs | 1 - .../Formatting_NetFx/FormattingDiagnosticValidationPassTest.cs | 1 - .../Formatting_NetFx/FormattingLanguageServerClient.cs | 1 - .../Formatting_NetFx/FormattingLanguageServerTestBase.cs | 2 -- .../Formatting_NetFx/FormattingTestBase.cs | 1 - .../Formatting_NetFx/RazorFormattingServiceTest.cs | 1 - .../GeneratedDocumentPublisherTest.cs | 1 - .../Hover/HoverServiceTest.cs | 1 - .../Implementation/ImplementationEndpointTest.cs | 1 - .../InlayHints/InlayHintEndpointTest.cs | 1 - .../LinkedEditingRange/LinkedEditingRangeEndpointTest.cs | 1 - .../MapCode/MapCodeTest.cs | 1 - .../Mapping/RazorLanguageQueryEndpointTest.cs | 1 - .../Mapping/RazorMapToDocumentRangesEndpointTest.cs | 1 - .../ProjectContexts/ProjectContextsEndpointTest.cs | 1 - .../RangeExtensionsTests.cs | 1 - .../RazorConfigurationEndpointTest.cs | 1 - .../RazorFileChangeDetectorManagerTest.cs | 1 - .../RazorLanguageServerTest.cs | 1 - .../Refactoring/RenameEndpointDelegationTest.cs | 1 - .../Refactoring/RenameEndpointTest.cs | 1 - .../Semantic/RazorSemanticTokensRefreshEndpointTest.cs | 1 - .../Semantic/SemanticTokensTest.cs | 1 - .../PlatformAgnosticClientCapabilitiesJsonConverterTest.cs | 1 - .../SignatureHelp/SignatureHelpEndpointTest.cs | 1 - ...ingleServerDelegatingEndpointTestBase.TestLanguageServer.cs | 1 - .../SingleServerDelegatingEndpointTestBase.cs | 1 - .../SpellCheck/DocumentSpellCheckEndpointTest.cs | 1 - .../TestClient.cs | 1 - .../WorkspaceSemanticTokensRefreshNotifierTest.cs | 1 - .../WrapWithTag/WrapWithTagEndpointTests.cs | 1 - .../LanguageServer/CSharpTestLspServer.cs | 2 -- .../LanguageServer/TestDocumentContextFactory.cs | 1 - 331 files changed, 2 insertions(+), 361 deletions(-) diff --git a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/BenchmarkClientCapabilitiesService.cs b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/BenchmarkClientCapabilitiesService.cs index 5abecc34303..2331cbb9c12 100644 --- a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/BenchmarkClientCapabilitiesService.cs +++ b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/BenchmarkClientCapabilitiesService.cs @@ -4,7 +4,6 @@ #nullable disable using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.Microbenchmarks.LanguageServer; diff --git a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorCSharpFormattingBenchmark.cs b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorCSharpFormattingBenchmark.cs index 4cfa36773c0..1b2c4cf7688 100644 --- a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorCSharpFormattingBenchmark.cs +++ b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorCSharpFormattingBenchmark.cs @@ -12,7 +12,6 @@ using Microsoft.AspNetCore.Razor.LanguageServer.Formatting; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.Microbenchmarks.LanguageServer; diff --git a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorCodeActionsBenchmark.cs b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorCodeActionsBenchmark.cs index 2f76d296831..21c4d3ca9ae 100644 --- a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorCodeActionsBenchmark.cs +++ b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorCodeActionsBenchmark.cs @@ -19,8 +19,6 @@ using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Text; using Microsoft.CommonLanguageServerProtocol.Framework; -using Microsoft.VisualStudio.LanguageServer.Protocol; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.Microbenchmarks.LanguageServer; diff --git a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorCompletionBenchmark.cs b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorCompletionBenchmark.cs index f9baad11704..959936aa90b 100644 --- a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorCompletionBenchmark.cs +++ b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorCompletionBenchmark.cs @@ -18,7 +18,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Text; using Microsoft.CommonLanguageServerProtocol.Framework; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.Microbenchmarks.LanguageServer; diff --git a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorDiagnosticsBenchmark.cs b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorDiagnosticsBenchmark.cs index 24444f16bdf..61be4c31490 100644 --- a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorDiagnosticsBenchmark.cs +++ b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorDiagnosticsBenchmark.cs @@ -20,9 +20,7 @@ using Microsoft.CodeAnalysis.Razor.Protocol.Diagnostics; using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.Microbenchmarks.LanguageServer; diff --git a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensBenchmark.cs b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensBenchmark.cs index fa61204cb93..2a8bbe848b8 100644 --- a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensBenchmark.cs +++ b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensBenchmark.cs @@ -19,8 +19,6 @@ using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Text; using Microsoft.Extensions.DependencyInjection; -using Microsoft.VisualStudio.LanguageServer.Protocol; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.Microbenchmarks.LanguageServer; diff --git a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensRangeEndpointBenchmark.cs b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensRangeEndpointBenchmark.cs index a30a3828c86..14f9adcac9f 100644 --- a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensRangeEndpointBenchmark.cs +++ b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensRangeEndpointBenchmark.cs @@ -21,8 +21,6 @@ using Microsoft.CodeAnalysis.Text; using Microsoft.CommonLanguageServerProtocol.Framework; using Microsoft.Extensions.DependencyInjection; -using Microsoft.VisualStudio.LanguageServer.Protocol; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.Microbenchmarks.LanguageServer; diff --git a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensScrollingBenchmark.cs b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensScrollingBenchmark.cs index be37d59ac3c..a3605ace618 100644 --- a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensScrollingBenchmark.cs +++ b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensScrollingBenchmark.cs @@ -13,9 +13,7 @@ using Microsoft.CodeAnalysis.Razor.SemanticTokens; using Microsoft.CodeAnalysis.Text; using Microsoft.Extensions.DependencyInjection; -using Microsoft.VisualStudio.LanguageServer.Protocol; using static Microsoft.AspNetCore.Razor.Microbenchmarks.LanguageServer.RazorSemanticTokensBenchmark; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.Microbenchmarks.LanguageServer; diff --git a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/Serialization/CompletionListSerializationBenchmark.cs b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/Serialization/CompletionListSerializationBenchmark.cs index 9e98822d88d..d6795a2d4a7 100644 --- a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/Serialization/CompletionListSerializationBenchmark.cs +++ b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/Serialization/CompletionListSerializationBenchmark.cs @@ -10,7 +10,6 @@ using Microsoft.AspNetCore.Razor.LanguageServer.Completion; using Microsoft.AspNetCore.Razor.LanguageServer.Hosting; using Microsoft.CodeAnalysis.Razor.Completion; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.Microbenchmarks.Serialization; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AbstractRazorDelegatingEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AbstractRazorDelegatingEndpoint.cs index 88574c846ba..b224765d9cc 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AbstractRazorDelegatingEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AbstractRazorDelegatingEndpoint.cs @@ -13,7 +13,6 @@ using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; using StreamJsonRpc; namespace Microsoft.AspNetCore.Razor.LanguageServer; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/AutoClosingTagOnAutoInsertProvider.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/AutoClosingTagOnAutoInsertProvider.cs index c553ce23987..d66d5fcda77 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/AutoClosingTagOnAutoInsertProvider.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/AutoClosingTagOnAutoInsertProvider.cs @@ -9,7 +9,6 @@ using Microsoft.AspNetCore.Razor.Language.Syntax; using Microsoft.AspNetCore.Razor.LanguageServer.Formatting; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.AutoInsert; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/CloseTextTagOnAutoInsertProvider.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/CloseTextTagOnAutoInsertProvider.cs index c644948cfd3..3c833bee83e 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/CloseTextTagOnAutoInsertProvider.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/CloseTextTagOnAutoInsertProvider.cs @@ -9,7 +9,6 @@ using Microsoft.AspNetCore.Razor.Language.Syntax; using Microsoft.AspNetCore.Razor.LanguageServer.Formatting; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.AutoInsert; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/IOnAutoInsertProvider.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/IOnAutoInsertProvider.cs index 5e83a82a646..7f918a275c5 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/IOnAutoInsertProvider.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/IOnAutoInsertProvider.cs @@ -3,7 +3,6 @@ using System.Diagnostics.CodeAnalysis; using Microsoft.AspNetCore.Razor.LanguageServer.Formatting; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.AutoInsert; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/OnAutoInsertEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/OnAutoInsertEndpoint.cs index ea7d46e8e45..7241826fae8 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/OnAutoInsertEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/OnAutoInsertEndpoint.cs @@ -16,7 +16,6 @@ using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.AutoInsert; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/PreferHtmlInAttributeValuesDocumentPositionStrategy.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/PreferHtmlInAttributeValuesDocumentPositionStrategy.cs index 3169a1d7648..3ee97974518 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/PreferHtmlInAttributeValuesDocumentPositionStrategy.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/PreferHtmlInAttributeValuesDocumentPositionStrategy.cs @@ -7,7 +7,6 @@ using Microsoft.CodeAnalysis.Razor.DocumentMapping; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.AutoInsert; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CapabilitiesManager.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CapabilitiesManager.cs index 46635c91ffb..d98dbe9993f 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CapabilitiesManager.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CapabilitiesManager.cs @@ -9,7 +9,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CommonLanguageServerProtocol.Framework; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.RpcContracts.Settings; using Microsoft.VisualStudio.Threading; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/ClientConnection.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/ClientConnection.cs index 0a3c90a7b8f..77a128a2580 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/ClientConnection.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/ClientConnection.cs @@ -6,7 +6,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.LanguageServer.Hosting; using Microsoft.CommonLanguageServerProtocol.Framework; -using Microsoft.VisualStudio.LanguageServer.Protocol; using StreamJsonRpc; namespace Microsoft.AspNetCore.Razor.LanguageServer; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/AddUsingsCodeActionProviderHelper.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/AddUsingsCodeActionProviderHelper.cs index a216287aea1..a1027062db7 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/AddUsingsCodeActionProviderHelper.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/AddUsingsCodeActionProviderHelper.cs @@ -15,7 +15,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.CodeActions; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/BaseDelegatedCodeActionResolver.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/BaseDelegatedCodeActionResolver.cs index 341c8ca5ae1..e0b3c564de5 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/BaseDelegatedCodeActionResolver.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/BaseDelegatedCodeActionResolver.cs @@ -8,7 +8,6 @@ using Microsoft.AspNetCore.Razor.LanguageServer.Hosting; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.CodeActions; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.CodeActions; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/CSharp/DefaultCSharpCodeActionResolver.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/CSharp/DefaultCSharpCodeActionResolver.cs index 9e62f694a04..4b7ba677def 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/CSharp/DefaultCSharpCodeActionResolver.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/CSharp/DefaultCSharpCodeActionResolver.cs @@ -12,7 +12,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.CodeActions; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/CSharp/TypeAccessibilityCodeActionProvider.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/CSharp/TypeAccessibilityCodeActionProvider.cs index e89d2880f55..e327b257a9d 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/CSharp/TypeAccessibilityCodeActionProvider.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/CSharp/TypeAccessibilityCodeActionProvider.cs @@ -17,7 +17,6 @@ using Microsoft.AspNetCore.Razor.Threading; using Microsoft.CodeAnalysis.ExternalAccess.Razor; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.CodeActions; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/CSharp/UnformattedRemappingCSharpCodeActionResolver.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/CSharp/UnformattedRemappingCSharpCodeActionResolver.cs index df9aaf7fe45..6efc272b6c4 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/CSharp/UnformattedRemappingCSharpCodeActionResolver.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/CSharp/UnformattedRemappingCSharpCodeActionResolver.cs @@ -13,7 +13,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.CodeActions; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/CodeActionEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/CodeActionEndpoint.cs index 124f3fc5935..d663e318ce9 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/CodeActionEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/CodeActionEndpoint.cs @@ -23,7 +23,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol.CodeActions; using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using StreamJsonRpc; namespace Microsoft.AspNetCore.Razor.LanguageServer.CodeActions; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/CodeActionResolveEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/CodeActionResolveEndpoint.cs index cdf0620fcab..b94ceea0519 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/CodeActionResolveEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/CodeActionResolveEndpoint.cs @@ -13,7 +13,6 @@ using Microsoft.AspNetCore.Razor.LanguageServer.EndpointContracts; using Microsoft.AspNetCore.Razor.PooledObjects; using Microsoft.CodeAnalysis.Razor.Logging; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.CodeActions; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Html/DefaultHtmlCodeActionProvider.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Html/DefaultHtmlCodeActionProvider.cs index 5f7f6d007e0..2b73f1522be 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Html/DefaultHtmlCodeActionProvider.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Html/DefaultHtmlCodeActionProvider.cs @@ -10,7 +10,6 @@ using Microsoft.AspNetCore.Razor.LanguageServer.Formatting; using Microsoft.AspNetCore.Razor.PooledObjects; using Microsoft.CodeAnalysis.Razor.DocumentMapping; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.CodeActions; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Html/DefaultHtmlCodeActionResolver.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Html/DefaultHtmlCodeActionResolver.cs index 604f02a3458..7b565a0bd1b 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Html/DefaultHtmlCodeActionResolver.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Html/DefaultHtmlCodeActionResolver.cs @@ -9,7 +9,6 @@ using Microsoft.CodeAnalysis.Razor.DocumentMapping; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.CodeActions; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Models/AddUsingsCodeActionParams.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Models/AddUsingsCodeActionParams.cs index 4f1bf25bcae..d04e0943b43 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Models/AddUsingsCodeActionParams.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Models/AddUsingsCodeActionParams.cs @@ -3,7 +3,6 @@ using System; using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.CodeActions.Models; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Models/CodeActionExtensions.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Models/CodeActionExtensions.cs index 8d10ca7bb71..25bb3b59185 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Models/CodeActionExtensions.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Models/CodeActionExtensions.cs @@ -5,7 +5,6 @@ using System.Linq; using System.Text.Json; using System.Text.Json.Nodes; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.CodeActions.Models; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Models/CodeActionResolveParams.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Models/CodeActionResolveParams.cs index 927b8a9ecf5..95476ead70a 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Models/CodeActionResolveParams.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Models/CodeActionResolveParams.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.CodeActions.Models; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Models/RazorVSInternalCodeAction.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Models/RazorVSInternalCodeAction.cs index dc53eff8e46..8f5da5002a7 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Models/RazorVSInternalCodeAction.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Models/RazorVSInternalCodeAction.cs @@ -3,7 +3,6 @@ using System.Runtime.Serialization; using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.CodeActions.Models; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/AddUsingsCodeActionResolver.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/AddUsingsCodeActionResolver.cs index ea5b810adfc..b6bd2f0296c 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/AddUsingsCodeActionResolver.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/AddUsingsCodeActionResolver.cs @@ -18,7 +18,6 @@ using Microsoft.AspNetCore.Razor.PooledObjects; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.CodeActions; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/CodeBlockService.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/CodeBlockService.cs index 62ece3f7a58..ffdfcc938bb 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/CodeBlockService.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/CodeBlockService.cs @@ -9,7 +9,6 @@ using Microsoft.AspNetCore.Razor.LanguageServer.Hosting; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.CodeActions.Razor; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/ComponentAccessibilityCodeActionProvider.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/ComponentAccessibilityCodeActionProvider.cs index 907ac96017c..9b78047864f 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/ComponentAccessibilityCodeActionProvider.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/ComponentAccessibilityCodeActionProvider.cs @@ -17,7 +17,6 @@ using Microsoft.AspNetCore.Razor.Utilities; using Microsoft.CodeAnalysis.Razor; using Microsoft.VisualStudio.Editor.Razor; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.CodeActions; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/CreateComponentCodeActionResolver.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/CreateComponentCodeActionResolver.cs index 29ddff07cc5..aa98932d2c4 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/CreateComponentCodeActionResolver.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/CreateComponentCodeActionResolver.cs @@ -14,7 +14,6 @@ using Microsoft.AspNetCore.Razor.PooledObjects; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.CodeActions; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/ExtractToCodeBehindCodeActionResolver.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/ExtractToCodeBehindCodeActionResolver.cs index 886dd50da75..25a29c971a2 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/ExtractToCodeBehindCodeActionResolver.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/ExtractToCodeBehindCodeActionResolver.cs @@ -22,7 +22,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol.CodeActions; using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.CodeActions; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/GenerateMethodCodeActionResolver.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/GenerateMethodCodeActionResolver.cs index 3168e767478..00fd783ef21 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/GenerateMethodCodeActionResolver.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/GenerateMethodCodeActionResolver.cs @@ -20,7 +20,6 @@ using Microsoft.CodeAnalysis.Razor.DocumentMapping; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; using CSharpSyntaxFactory = Microsoft.CodeAnalysis.CSharp.SyntaxFactory; namespace Microsoft.AspNetCore.Razor.LanguageServer.CodeActions.Razor; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/IRazorCodeActionResolver.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/IRazorCodeActionResolver.cs index 60b58952eea..9d2478b88a2 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/IRazorCodeActionResolver.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/IRazorCodeActionResolver.cs @@ -4,7 +4,6 @@ using System.Text.Json; using System.Threading; using System.Threading.Tasks; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.CodeActions; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/RazorCodeActionFactory.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/RazorCodeActionFactory.cs index 832f3c2a351..6b996880775 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/RazorCodeActionFactory.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Razor/RazorCodeActionFactory.cs @@ -4,7 +4,6 @@ using System; using System.Text.Json; using Microsoft.AspNetCore.Razor.LanguageServer.CodeActions.Models; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.CodeActions.Razor; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/ColorPresentation/ColorPresentationEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/ColorPresentation/ColorPresentationEndpoint.cs index 3e53f3ab948..e93bfecb498 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/ColorPresentation/ColorPresentationEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/ColorPresentation/ColorPresentationEndpoint.cs @@ -8,7 +8,6 @@ using Microsoft.AspNetCore.Razor.LanguageServer.Hosting; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.ColorPresentation; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.ColorPresentation; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/AggregateCompletionItemResolver.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/AggregateCompletionItemResolver.cs index 21075cfacc1..e321fa0ef11 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/AggregateCompletionItemResolver.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/AggregateCompletionItemResolver.cs @@ -9,7 +9,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.PooledObjects; using Microsoft.CodeAnalysis.Razor.Logging; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Completion; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionItemResolver.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionItemResolver.cs index 010b53c71db..64996ea6471 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionItemResolver.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionItemResolver.cs @@ -3,7 +3,6 @@ using System.Threading; using System.Threading.Tasks; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Completion; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionListCache.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionListCache.cs index ee163ec8b1a..da335a0d684 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionListCache.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionListCache.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using System; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Completion; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionListMerger.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionListMerger.cs index cf1344a1936..ddac8244746 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionListMerger.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionListMerger.cs @@ -11,7 +11,6 @@ using System.Text.Json.Serialization; using Microsoft.AspNetCore.Razor.PooledObjects; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Newtonsoft.Json.Linq; namespace Microsoft.AspNetCore.Razor.LanguageServer.Completion; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionListOptimizer.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionListOptimizer.cs index 0fa09dcc0b2..5147c57c251 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionListOptimizer.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionListOptimizer.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Linq; -using Microsoft.VisualStudio.LanguageServer.Protocol; using AliasedVSCommitCharacters = Microsoft.VisualStudio.LanguageServer.Protocol.SumType; namespace Microsoft.AspNetCore.Razor.LanguageServer.Completion; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionListProvider.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionListProvider.cs index f296da09b3d..23ddbcc8db1 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionListProvider.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionListProvider.cs @@ -9,7 +9,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.LanguageServer.Completion.Delegation; using Microsoft.CodeAnalysis.Razor.ProjectSystem; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Completion; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/DelegatedCompletionItemResolver.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/DelegatedCompletionItemResolver.cs index 7d58f7bfbd6..bbd5c27f005 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/DelegatedCompletionItemResolver.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/DelegatedCompletionItemResolver.cs @@ -10,7 +10,6 @@ using Microsoft.AspNetCore.Razor.LanguageServer.Hosting; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Completion.Delegation; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/DelegatedCompletionListProvider.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/DelegatedCompletionListProvider.cs index a35d13bb895..8571b3bcd9a 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/DelegatedCompletionListProvider.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/DelegatedCompletionListProvider.cs @@ -13,7 +13,6 @@ using Microsoft.CodeAnalysis.Razor.DocumentMapping; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Completion.Delegation; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/DelegatedCompletionResponseRewriter.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/DelegatedCompletionResponseRewriter.cs index 68c04994f45..57de12530ba 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/DelegatedCompletionResponseRewriter.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/DelegatedCompletionResponseRewriter.cs @@ -5,7 +5,6 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Completion.Delegation; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/DesignTimeHelperResponseRewriter.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/DesignTimeHelperResponseRewriter.cs index 675b2d27148..2d4f3223a57 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/DesignTimeHelperResponseRewriter.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/DesignTimeHelperResponseRewriter.cs @@ -10,7 +10,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using RazorSyntaxNode = Microsoft.AspNetCore.Razor.Language.Syntax.SyntaxNode; namespace Microsoft.AspNetCore.Razor.LanguageServer.Completion.Delegation; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/HtmlCommitCharacterResponseRewriter.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/HtmlCommitCharacterResponseRewriter.cs index 1bd58636764..48c24deec92 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/HtmlCommitCharacterResponseRewriter.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/HtmlCommitCharacterResponseRewriter.cs @@ -8,7 +8,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Completion.Delegation; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/SnippetResponseRewriter.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/SnippetResponseRewriter.cs index 85ceaa682a6..e1e8d1667d4 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/SnippetResponseRewriter.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/SnippetResponseRewriter.cs @@ -7,7 +7,6 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Completion.Delegation; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/TextEditResponseRewriter.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/TextEditResponseRewriter.cs index b25972b14ea..ac6bb4aaebd 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/TextEditResponseRewriter.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/TextEditResponseRewriter.cs @@ -5,7 +5,6 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Completion.Delegation; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/RazorCompletionEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/RazorCompletionEndpoint.cs index fea284d3d97..fa3cc7348ea 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/RazorCompletionEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/RazorCompletionEndpoint.cs @@ -9,7 +9,6 @@ using Microsoft.AspNetCore.Razor.LanguageServer.EndpointContracts; using Microsoft.AspNetCore.Razor.Telemetry; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Completion; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/RazorCompletionItemResolver.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/RazorCompletionItemResolver.cs index 6cc6fd21f6e..c216ae10c6d 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/RazorCompletionItemResolver.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/RazorCompletionItemResolver.cs @@ -8,7 +8,6 @@ using Microsoft.AspNetCore.Razor.LanguageServer.Tooltip; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Razor.Completion; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Text.Adornments; namespace Microsoft.AspNetCore.Razor.LanguageServer.Completion; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/RazorCompletionListProvider.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/RazorCompletionListProvider.cs index e73f38dcad8..74ce4cc94f2 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/RazorCompletionListProvider.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/RazorCompletionListProvider.cs @@ -14,7 +14,6 @@ using Microsoft.CodeAnalysis.Razor.Completion; using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.ProjectSystem; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Completion; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/RazorCompletionResolveEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/RazorCompletionResolveEndpoint.cs index 5c22672d50f..a96a1abb23f 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/RazorCompletionResolveEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/RazorCompletionResolveEndpoint.cs @@ -5,7 +5,6 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.LanguageServer.EndpointContracts; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Completion; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/VSInternalCompletionItemExtensions.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/VSInternalCompletionItemExtensions.cs index c52fe46804c..eac89b3c240 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/VSInternalCompletionItemExtensions.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/VSInternalCompletionItemExtensions.cs @@ -7,7 +7,6 @@ using System.Diagnostics.CodeAnalysis; using Microsoft.AspNetCore.Razor.PooledObjects; using Microsoft.CodeAnalysis.Razor.Completion; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Completion; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/VSInternalCompletionListExtensions.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/VSInternalCompletionListExtensions.cs index 94a502eb190..4d0c90a396c 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/VSInternalCompletionListExtensions.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/VSInternalCompletionListExtensions.cs @@ -5,7 +5,6 @@ using System.Linq; using System.Text.Json; using System.Text.Json.Nodes; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Completion; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Debugging/RazorBreakpointSpanEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Debugging/RazorBreakpointSpanEndpoint.cs index f28856851d3..bd9124daafe 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Debugging/RazorBreakpointSpanEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Debugging/RazorBreakpointSpanEndpoint.cs @@ -14,7 +14,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol.Debugging; using Microsoft.CodeAnalysis.Text; using Microsoft.CommonLanguageServerProtocol.Framework; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Debugging; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Debugging/RazorProximityExpressionsEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Debugging/RazorProximityExpressionsEndpoint.cs index cf6700e9a68..9d5b42ebaa6 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Debugging/RazorProximityExpressionsEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Debugging/RazorProximityExpressionsEndpoint.cs @@ -15,7 +15,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol.Debugging; using Microsoft.CodeAnalysis.Text; using Microsoft.CommonLanguageServerProtocol.Framework; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Debugging; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Debugging/ValidateBreakpointRangeEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Debugging/ValidateBreakpointRangeEndpoint.cs index 5f5c32bb01d..7e4cb4a209b 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Debugging/ValidateBreakpointRangeEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Debugging/ValidateBreakpointRangeEndpoint.cs @@ -11,7 +11,6 @@ using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Debugging; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Debugging/ValidateBreakpointRangeParams.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Debugging/ValidateBreakpointRangeParams.cs index afc28afba5a..b282bb92eb9 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Debugging/ValidateBreakpointRangeParams.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Debugging/ValidateBreakpointRangeParams.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using System; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Debugging; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DefaultDocumentPositionInfoStrategy.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DefaultDocumentPositionInfoStrategy.cs index a9ebe134264..28f9bebe04e 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DefaultDocumentPositionInfoStrategy.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DefaultDocumentPositionInfoStrategy.cs @@ -6,7 +6,6 @@ using Microsoft.CodeAnalysis.Razor.DocumentMapping; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DefaultRazorConfigurationService.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DefaultRazorConfigurationService.cs index 6010dde3ebd..ac5b7c15082 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DefaultRazorConfigurationService.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DefaultRazorConfigurationService.cs @@ -10,7 +10,6 @@ using Microsoft.AspNetCore.Razor.LanguageServer.Hosting; using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.Settings; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Definition/DefinitionEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Definition/DefinitionEndpoint.cs index 41ef8c1ecf2..8082873a320 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Definition/DefinitionEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Definition/DefinitionEndpoint.cs @@ -17,12 +17,10 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; using DefinitionResult = Microsoft.VisualStudio.LanguageServer.Protocol.SumType< Microsoft.VisualStudio.LanguageServer.Protocol.VSInternalLocation, Microsoft.VisualStudio.LanguageServer.Protocol.VSInternalLocation[], Microsoft.VisualStudio.LanguageServer.Protocol.DocumentLink[]>; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; using SyntaxKind = Microsoft.AspNetCore.Razor.Language.SyntaxKind; namespace Microsoft.AspNetCore.Razor.LanguageServer.Definition; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/DocumentPullDiagnosticsEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/DocumentPullDiagnosticsEndpoint.cs index b4277742608..79c3464a9b9 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/DocumentPullDiagnosticsEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/DocumentPullDiagnosticsEndpoint.cs @@ -14,7 +14,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.Diagnostics; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Diagnostics; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorDiagnosticConverter.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorDiagnosticConverter.cs index ce6dd366ab9..38729b486aa 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorDiagnosticConverter.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorDiagnosticConverter.cs @@ -7,8 +7,6 @@ using Microsoft.AspNetCore.Razor.Language; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.LanguageServer.Diagnostics; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorDiagnosticsPublisher.TestAccessor.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorDiagnosticsPublisher.TestAccessor.cs index ddcc99f5817..b8b331260c4 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorDiagnosticsPublisher.TestAccessor.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorDiagnosticsPublisher.TestAccessor.cs @@ -6,7 +6,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.Language; using Microsoft.CodeAnalysis.Razor.ProjectSystem; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Diagnostics; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorDiagnosticsPublisher.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorDiagnosticsPublisher.cs index e3f0eb8d901..31b4825ad74 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorDiagnosticsPublisher.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorDiagnosticsPublisher.cs @@ -17,7 +17,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Threading; namespace Microsoft.AspNetCore.Razor.LanguageServer.Diagnostics; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorTranslateDiagnosticsService.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorTranslateDiagnosticsService.cs index bb851658894..f386fc9f19d 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorTranslateDiagnosticsService.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorTranslateDiagnosticsService.cs @@ -16,10 +16,8 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Diagnostic = Microsoft.VisualStudio.LanguageServer.Protocol.Diagnostic; using DiagnosticSeverity = Microsoft.VisualStudio.LanguageServer.Protocol.DiagnosticSeverity; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; using SyntaxNode = Microsoft.AspNetCore.Razor.Language.Syntax.SyntaxNode; namespace Microsoft.AspNetCore.Razor.LanguageServer.Diagnostics; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentColor/DocumentColorEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentColor/DocumentColorEndpoint.cs index 61fa87dd95e..cc5d04d076e 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentColor/DocumentColorEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentColor/DocumentColorEndpoint.cs @@ -6,7 +6,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.LanguageServer.EndpointContracts; using Microsoft.AspNetCore.Razor.LanguageServer.Hosting; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.DocumentColor; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentColor/DocumentColorService.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentColor/DocumentColorService.cs index 56cf6818cd2..f7bc9a1174c 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentColor/DocumentColorService.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentColor/DocumentColorService.cs @@ -7,7 +7,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.ColorPresentation; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.DocumentColor; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentColor/IDocumentColorService.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentColor/IDocumentColorService.cs index f2e90ab2df7..c2dedaee3cc 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentColor/IDocumentColorService.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentColor/IDocumentColorService.cs @@ -5,7 +5,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.LanguageServer.Hosting; using Microsoft.CodeAnalysis.Razor.ProjectSystem; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.DocumentColor; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentContextFactory.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentContextFactory.cs index c752e617e0b..5b3e2efc798 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentContextFactory.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentContextFactory.cs @@ -12,7 +12,6 @@ using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentHighlighting/DocumentHighlightEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentHighlighting/DocumentHighlightEndpoint.cs index 5854d01677e..3b0e13d4b96 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentHighlighting/DocumentHighlightEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentHighlighting/DocumentHighlightEndpoint.cs @@ -12,7 +12,6 @@ using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.DocumentHighlighting; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/AbstractTextDocumentPresentationEndpointBase.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/AbstractTextDocumentPresentationEndpointBase.cs index e45daae36d9..96d829f98bc 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/AbstractTextDocumentPresentationEndpointBase.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/AbstractTextDocumentPresentationEndpointBase.cs @@ -18,7 +18,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol.DocumentPresentation; using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.DocumentPresentation; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/ITextDocumentTextPresentationHandler.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/ITextDocumentTextPresentationHandler.cs index fba285f3ebc..56d6fd402f8 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/ITextDocumentTextPresentationHandler.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/ITextDocumentTextPresentationHandler.cs @@ -3,7 +3,6 @@ using Microsoft.AspNetCore.Razor.LanguageServer.EndpointContracts; using Microsoft.CodeAnalysis.Razor.Protocol.DocumentPresentation; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.DocumentPresentation; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/ITextDocumentUriPresentationHandler.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/ITextDocumentUriPresentationHandler.cs index 97c1e0ecaef..976273c4ac8 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/ITextDocumentUriPresentationHandler.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/ITextDocumentUriPresentationHandler.cs @@ -3,7 +3,6 @@ using Microsoft.AspNetCore.Razor.LanguageServer.EndpointContracts; using Microsoft.CodeAnalysis.Razor.Protocol.DocumentPresentation; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.DocumentPresentation; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/TextDocumentTextPresentationEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/TextDocumentTextPresentationEndpoint.cs index 69aea0a8c69..707138cb469 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/TextDocumentTextPresentationEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/TextDocumentTextPresentationEndpoint.cs @@ -10,7 +10,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.DocumentPresentation; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.DocumentPresentation; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/TextDocumentUriPresentationEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/TextDocumentUriPresentationEndpoint.cs index 8d1d0392421..bf3978fb76f 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/TextDocumentUriPresentationEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentPresentation/TextDocumentUriPresentationEndpoint.cs @@ -12,7 +12,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.DocumentPresentation; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.DocumentPresentation; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentSymbols/DocumentSymbolEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentSymbols/DocumentSymbolEndpoint.cs index e64bb4e1df1..2f90d525fb5 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentSymbols/DocumentSymbolEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentSymbols/DocumentSymbolEndpoint.cs @@ -12,7 +12,6 @@ using Microsoft.CodeAnalysis.Razor.DocumentMapping; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Text.Tagging; namespace Microsoft.AspNetCore.Razor.LanguageServer.DocumentSymbols; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentSynchronization/DocumentDidChangeEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentSynchronization/DocumentDidChangeEndpoint.cs index afd1da50b3c..569a325ac1f 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentSynchronization/DocumentDidChangeEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentSynchronization/DocumentDidChangeEndpoint.cs @@ -11,7 +11,6 @@ using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Text; using Microsoft.CommonLanguageServerProtocol.Framework; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.DocumentSynchronization; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentSynchronization/DocumentDidCloseEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentSynchronization/DocumentDidCloseEndpoint.cs index f167f64356b..0ebddd56f73 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentSynchronization/DocumentDidCloseEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentSynchronization/DocumentDidCloseEndpoint.cs @@ -8,7 +8,6 @@ using Microsoft.AspNetCore.Razor.LanguageServer.ProjectSystem; using Microsoft.CodeAnalysis.Razor; using Microsoft.CommonLanguageServerProtocol.Framework; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.DocumentSynchronization; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentSynchronization/DocumentDidOpenEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentSynchronization/DocumentDidOpenEndpoint.cs index 8af40ddf029..dc724c75fbc 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentSynchronization/DocumentDidOpenEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentSynchronization/DocumentDidOpenEndpoint.cs @@ -7,7 +7,6 @@ using Microsoft.AspNetCore.Razor.LanguageServer.ProjectSystem; using Microsoft.CodeAnalysis.Razor; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.DocumentSynchronization; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentSynchronization/DocumentDidSaveEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentSynchronization/DocumentDidSaveEndpoint.cs index 19cadfb93e8..c53d34cafbb 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentSynchronization/DocumentDidSaveEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DocumentSynchronization/DocumentDidSaveEndpoint.cs @@ -7,7 +7,6 @@ using Microsoft.CodeAnalysis.Razor; using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CommonLanguageServerProtocol.Framework; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.DocumentSynchronization; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/EndpointContracts/IDidChangeConfigurationEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/EndpointContracts/IDidChangeConfigurationEndpoint.cs index 9eb0fd97dc3..65fe3a2f68b 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/EndpointContracts/IDidChangeConfigurationEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/EndpointContracts/IDidChangeConfigurationEndpoint.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See License.txt in the project root for license information. -using Microsoft.VisualStudio.LanguageServer.Protocol; - namespace Microsoft.AspNetCore.Razor.LanguageServer.EndpointContracts; [RazorLanguageServerEndpoint(Methods.WorkspaceDidChangeConfigurationName)] diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/EndpointContracts/IRazorRequestHandler.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/EndpointContracts/IRazorRequestHandler.cs index 42440bf86ab..6e35df1ee9e 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/EndpointContracts/IRazorRequestHandler.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/EndpointContracts/IRazorRequestHandler.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using Microsoft.CommonLanguageServerProtocol.Framework; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.EndpointContracts; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Extensions/IServiceCollectionExtensions.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Extensions/IServiceCollectionExtensions.cs index 167a0c55101..ee96e827e70 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Extensions/IServiceCollectionExtensions.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Extensions/IServiceCollectionExtensions.cs @@ -30,7 +30,6 @@ using Microsoft.CommonLanguageServerProtocol.Framework; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Extensions; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/FindAllReferences/FindAllReferencesEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/FindAllReferences/FindAllReferencesEndpoint.cs index b3b9da23856..4d857727aeb 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/FindAllReferences/FindAllReferencesEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/FindAllReferences/FindAllReferencesEndpoint.cs @@ -14,7 +14,6 @@ using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Text.Adornments; namespace Microsoft.AspNetCore.Razor.LanguageServer.FindAllReferences; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Folding/FoldingRangeEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Folding/FoldingRangeEndpoint.cs index d94e078be6b..42f80f9c91e 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Folding/FoldingRangeEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Folding/FoldingRangeEndpoint.cs @@ -18,7 +18,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.Folding; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Folding; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpFormatter.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpFormatter.cs index 88b790cac64..65d36ed0499 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpFormatter.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpFormatter.cs @@ -14,8 +14,6 @@ using Microsoft.CodeAnalysis.ExternalAccess.Razor; using Microsoft.CodeAnalysis.Razor.DocumentMapping; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpFormattingPass.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpFormattingPass.cs index ae44807e53d..407d5875d08 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpFormattingPass.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpFormattingPass.cs @@ -13,7 +13,6 @@ using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpFormattingPassBase.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpFormattingPassBase.cs index 098e56d3a77..89d17ad85ec 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpFormattingPassBase.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpFormattingPassBase.cs @@ -13,8 +13,6 @@ using Microsoft.AspNetCore.Razor.Language.Syntax; using Microsoft.CodeAnalysis.Razor.DocumentMapping; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpOnTypeFormattingPass.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpOnTypeFormattingPass.cs index 2c2d6677dae..431c50a7ff1 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpOnTypeFormattingPass.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/CSharpOnTypeFormattingPass.cs @@ -19,8 +19,6 @@ using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; using SyntaxNode = Microsoft.AspNetCore.Razor.Language.Syntax.SyntaxNode; namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/DocumentFormattingEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/DocumentFormattingEndpoint.cs index 1c074702874..7f7606d473a 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/DocumentFormattingEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/DocumentFormattingEndpoint.cs @@ -6,7 +6,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.Language; using Microsoft.AspNetCore.Razor.LanguageServer.EndpointContracts; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/DocumentOnTypeFormattingEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/DocumentOnTypeFormattingEndpoint.cs index 71389874fcc..a534aafd87f 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/DocumentOnTypeFormattingEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/DocumentOnTypeFormattingEndpoint.cs @@ -13,7 +13,6 @@ using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/DocumentRangeFormattingEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/DocumentRangeFormattingEndpoint.cs index 414a1bf1ef5..6da4c776ec9 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/DocumentRangeFormattingEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/DocumentRangeFormattingEndpoint.cs @@ -6,7 +6,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.Language; using Microsoft.AspNetCore.Razor.LanguageServer.EndpointContracts; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/FormattingContentValidationPass.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/FormattingContentValidationPass.cs index ec990b20f27..b6e46c58da2 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/FormattingContentValidationPass.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/FormattingContentValidationPass.cs @@ -9,7 +9,6 @@ using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/FormattingContext.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/FormattingContext.cs index 9e1c13b6e92..f1e1cec1028 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/FormattingContext.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/FormattingContext.cs @@ -12,7 +12,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/FormattingDiagnosticValidationPass.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/FormattingDiagnosticValidationPass.cs index ed7d5014b05..64d54a9a33a 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/FormattingDiagnosticValidationPass.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/FormattingDiagnosticValidationPass.cs @@ -11,7 +11,6 @@ using Microsoft.CodeAnalysis.Razor.DocumentMapping; using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/FormattingOptionsExtensions.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/FormattingOptionsExtensions.cs index 5271e0f9ec1..6c6aa6f8ab3 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/FormattingOptionsExtensions.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/FormattingOptionsExtensions.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using Microsoft.CodeAnalysis.ExternalAccess.Razor; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/FormattingPassBase.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/FormattingPassBase.cs index 79a5af2ee64..5ae7cb2d988 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/FormattingPassBase.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/FormattingPassBase.cs @@ -8,7 +8,6 @@ using Microsoft.AspNetCore.Razor.LanguageServer.Hosting; using Microsoft.CodeAnalysis.Razor.DocumentMapping; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/FormattingResult.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/FormattingResult.cs index 7dc0c87c222..46067d90266 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/FormattingResult.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/FormattingResult.cs @@ -3,7 +3,6 @@ using System; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/HtmlFormatter.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/HtmlFormatter.cs index 288afdeacac..bd3e7177b23 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/HtmlFormatter.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/HtmlFormatter.cs @@ -10,7 +10,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.Formatting; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/HtmlFormattingPass.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/HtmlFormattingPass.cs index 988494d9858..f4494c1aaf2 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/HtmlFormattingPass.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/HtmlFormattingPass.cs @@ -12,7 +12,6 @@ using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/IRazorFormattingService.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/IRazorFormattingService.cs index 9048b915931..1b083959198 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/IRazorFormattingService.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/IRazorFormattingService.cs @@ -5,7 +5,6 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/RazorFormattingPass.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/RazorFormattingPass.cs index 389a1d71d50..4a2cf9a7e6b 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/RazorFormattingPass.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/RazorFormattingPass.cs @@ -12,7 +12,6 @@ using Microsoft.AspNetCore.Razor.Language.Syntax; using Microsoft.CodeAnalysis.Razor.DocumentMapping; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/RazorFormattingService.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/RazorFormattingService.cs index 89f49f0bf5e..f0e5318328a 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/RazorFormattingService.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/RazorFormattingService.cs @@ -12,8 +12,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/GeneratedDocumentPublisher.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/GeneratedDocumentPublisher.cs index 4799f85575e..fc6b2c80e2c 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/GeneratedDocumentPublisher.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/GeneratedDocumentPublisher.cs @@ -16,7 +16,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Threading; namespace Microsoft.AspNetCore.Razor.LanguageServer; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hosting/RazorLanguageServerCapability.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hosting/RazorLanguageServerCapability.cs index 0eac8fb6c58..74ffb3e9ebf 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hosting/RazorLanguageServerCapability.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hosting/RazorLanguageServerCapability.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Text.Json; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Hosting; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hosting/RazorLanguageServerHost.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hosting/RazorLanguageServerHost.cs index 56e9cb461b9..bb53b2b3444 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hosting/RazorLanguageServerHost.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hosting/RazorLanguageServerHost.cs @@ -11,7 +11,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.Extensions.DependencyInjection; -using Microsoft.VisualStudio.LanguageServer.Protocol; using StreamJsonRpc; namespace Microsoft.AspNetCore.Razor.LanguageServer.Hosting; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hosting/VSInternalServerCapabilitiesExtensions.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hosting/VSInternalServerCapabilitiesExtensions.cs index 83b32a3dd23..a12054ad5e8 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hosting/VSInternalServerCapabilitiesExtensions.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hosting/VSInternalServerCapabilitiesExtensions.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using Microsoft.CodeAnalysis.Razor.SemanticTokens; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Hosting; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/HoverEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/HoverEndpoint.cs index 956c0fec725..aca0ec495fb 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/HoverEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/HoverEndpoint.cs @@ -11,7 +11,6 @@ using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Hover; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/HoverService.TestAccessor.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/HoverService.TestAccessor.cs index c78299255ad..2648847ea86 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/HoverService.TestAccessor.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/HoverService.TestAccessor.cs @@ -4,7 +4,6 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.Language; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Hover; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/HoverService.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/HoverService.cs index 218e474e2a2..651010b0a12 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/HoverService.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/HoverService.cs @@ -17,10 +17,7 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Tooltip; using Microsoft.VisualStudio.Editor.Razor; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Text.Adornments; -using MarkupKind = Microsoft.VisualStudio.LanguageServer.Protocol.MarkupKind; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.LanguageServer.Hover; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/IHoverService.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/IHoverService.cs index 5408dd8f17d..f0140439629 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/IHoverService.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/IHoverService.cs @@ -5,7 +5,6 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis.Razor.DocumentMapping; using Microsoft.CodeAnalysis.Razor.ProjectSystem; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Hover; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/IDocumentPositionInfoStrategy.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/IDocumentPositionInfoStrategy.cs index c575fc47796..17e28d5168e 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/IDocumentPositionInfoStrategy.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/IDocumentPositionInfoStrategy.cs @@ -5,7 +5,6 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis.Razor.DocumentMapping; using Microsoft.CodeAnalysis.Razor.ProjectSystem; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/IOnInitialized.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/IOnInitialized.cs index 0dfd09f719d..08921fa1db6 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/IOnInitialized.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/IOnInitialized.cs @@ -4,7 +4,6 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.CommonLanguageServerProtocol.Framework; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Implementation/ImplementationEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Implementation/ImplementationEndpoint.cs index fc5c3807078..293b5652077 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Implementation/ImplementationEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Implementation/ImplementationEndpoint.cs @@ -11,7 +11,6 @@ using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; using ImplementationResult = Microsoft.VisualStudio.LanguageServer.Protocol.SumType< Microsoft.VisualStudio.LanguageServer.Protocol.Location[], Microsoft.VisualStudio.LanguageServer.Protocol.VSInternalReferenceItem[]>; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/IInlayHintService.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/IInlayHintService.cs index 54865b68151..d3f0b2d10aa 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/IInlayHintService.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/IInlayHintService.cs @@ -5,7 +5,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.LanguageServer.Hosting; using Microsoft.CodeAnalysis.Razor.ProjectSystem; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.InlayHints; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/InlayHintEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/InlayHintEndpoint.cs index 3a4f746604a..894559f8f39 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/InlayHintEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/InlayHintEndpoint.cs @@ -7,7 +7,6 @@ using Microsoft.AspNetCore.Razor.LanguageServer.Hosting; using Microsoft.AspNetCore.Razor.Threading; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.InlayHints; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/InlayHintResolveEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/InlayHintResolveEndpoint.cs index 1f5b6cf999d..7432376bc5e 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/InlayHintResolveEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/InlayHintResolveEndpoint.cs @@ -5,7 +5,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.LanguageServer.EndpointContracts; using Microsoft.AspNetCore.Razor.LanguageServer.Hosting; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.InlayHints; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/InlayHintService.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/InlayHintService.cs index c0debade37d..4459e7a94f8 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/InlayHintService.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/InlayHintService.cs @@ -14,7 +14,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces.InlayHints; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.InlayHints; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/RazorInlayHintWrapper.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/RazorInlayHintWrapper.cs index 8d21b84e325..9386a65f42a 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/RazorInlayHintWrapper.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/RazorInlayHintWrapper.cs @@ -3,7 +3,6 @@ using System.Text.Json.Serialization; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.Workspaces.InlayHints; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlineCompletion/InlineCompletionEndPoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlineCompletion/InlineCompletionEndPoint.cs index 9593b528e87..1bac93d63cd 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlineCompletion/InlineCompletionEndPoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlineCompletion/InlineCompletionEndPoint.cs @@ -19,7 +19,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol.Completion; using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.InlineCompletion; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/LinkedEditingRange/LinkedEditingRangeEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/LinkedEditingRange/LinkedEditingRangeEndpoint.cs index 977805958e8..06277e48ac1 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/LinkedEditingRange/LinkedEditingRangeEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/LinkedEditingRange/LinkedEditingRangeEndpoint.cs @@ -8,7 +8,6 @@ using Microsoft.CodeAnalysis.Razor.LinkedEditingRange; using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.LinkedEditingRange; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/MapCode/MapCodeEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/MapCode/MapCodeEndpoint.cs index 5887fa977fa..47567f00ee5 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/MapCode/MapCodeEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/MapCode/MapCodeEndpoint.cs @@ -22,7 +22,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Location = Microsoft.VisualStudio.LanguageServer.Protocol.Location; using SyntaxNode = Microsoft.AspNetCore.Razor.Language.Syntax.SyntaxNode; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/MapCode/Mappers/InsertMapper.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/MapCode/Mappers/InsertMapper.cs index d5981471507..edd26152e62 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/MapCode/Mappers/InsertMapper.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/MapCode/Mappers/InsertMapper.cs @@ -4,7 +4,6 @@ using Microsoft.AspNetCore.Razor.Language.Syntax; using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using LSP = Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.MapCode.Mappers; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Mapping/RazorLanguageQueryEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Mapping/RazorLanguageQueryEndpoint.cs index b4e6da2b476..d0cb3455c21 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Mapping/RazorLanguageQueryEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Mapping/RazorLanguageQueryEndpoint.cs @@ -9,7 +9,6 @@ using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Mapping; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Mapping/RazorLanguageQueryParams.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Mapping/RazorLanguageQueryParams.cs index 87b292a0911..49e4aa8c8f3 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Mapping/RazorLanguageQueryParams.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Mapping/RazorLanguageQueryParams.cs @@ -4,7 +4,6 @@ using System; using System.Runtime.Serialization; using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Mapping; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Mapping/RazorLanguageQueryResponse.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Mapping/RazorLanguageQueryResponse.cs index 584ff8e63d9..daac058f926 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Mapping/RazorLanguageQueryResponse.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Mapping/RazorLanguageQueryResponse.cs @@ -3,7 +3,6 @@ using System.Text.Json.Serialization; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Mapping; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Mapping/RazorMapToDocumentRangesEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Mapping/RazorMapToDocumentRangesEndpoint.cs index 1ab59705e3f..ed24c8a561d 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Mapping/RazorMapToDocumentRangesEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Mapping/RazorMapToDocumentRangesEndpoint.cs @@ -10,8 +10,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.DocumentMapping; using Microsoft.CommonLanguageServerProtocol.Framework; -using Microsoft.VisualStudio.LanguageServer.Protocol; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.LanguageServer.Mapping; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/PreferAttributeNameDocumentPositionInfoStrategy.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/PreferAttributeNameDocumentPositionInfoStrategy.cs index 3bd88203f85..79d505ccac3 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/PreferAttributeNameDocumentPositionInfoStrategy.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/PreferAttributeNameDocumentPositionInfoStrategy.cs @@ -6,7 +6,6 @@ using Microsoft.CodeAnalysis.Razor.DocumentMapping; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/ProjectContexts/ProjectContextsEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/ProjectContexts/ProjectContextsEndpoint.cs index 7be2146e3a7..4d34108c12b 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/ProjectContexts/ProjectContextsEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/ProjectContexts/ProjectContextsEndpoint.cs @@ -7,7 +7,6 @@ using Microsoft.AspNetCore.Razor.LanguageServer.EndpointContracts; using Microsoft.AspNetCore.Razor.LanguageServer.Hosting; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.ProjectContexts; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorConfigurationEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorConfigurationEndpoint.cs index 57e8793dd49..6105ce85c64 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorConfigurationEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorConfigurationEndpoint.cs @@ -8,7 +8,6 @@ using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CommonLanguageServerProtocol.Framework; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorInitializeEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorInitializeEndpoint.cs index 205cafb4345..51147b32448 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorInitializeEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorInitializeEndpoint.cs @@ -5,7 +5,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.LanguageServer.EndpointContracts; using Microsoft.CommonLanguageServerProtocol.Framework; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorInitializedEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorInitializedEndpoint.cs index 277533d056c..8ae9c79918b 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorInitializedEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorInitializedEndpoint.cs @@ -7,7 +7,6 @@ using Microsoft.AspNetCore.Razor.LanguageServer.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CommonLanguageServerProtocol.Framework; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorRequestContextFactory.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorRequestContextFactory.cs index 3383b82b7cb..560fe83a80a 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorRequestContextFactory.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorRequestContextFactory.cs @@ -9,7 +9,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CommonLanguageServerProtocol.Framework; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Refactoring/RenameEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Refactoring/RenameEndpoint.cs index 2ece256074c..8de141409b2 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Refactoring/RenameEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Refactoring/RenameEndpoint.cs @@ -21,7 +21,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Refactoring; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Semantic/SemanticTokensRangeEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Semantic/SemanticTokensRangeEndpoint.cs index c75e1b44112..1ce6da5c381 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Semantic/SemanticTokensRangeEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Semantic/SemanticTokensRangeEndpoint.cs @@ -9,7 +9,6 @@ using Microsoft.AspNetCore.Razor.Telemetry; using Microsoft.CodeAnalysis.Razor.SemanticTokens; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Semantic; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Semantic/Services/LSPCSharpSemanticTokensProvider.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Semantic/Services/LSPCSharpSemanticTokensProvider.cs index f507b9104a0..7fab9a6f0f3 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Semantic/Services/LSPCSharpSemanticTokensProvider.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Semantic/Services/LSPCSharpSemanticTokensProvider.cs @@ -14,8 +14,6 @@ using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Razor.Workspaces.Protocol.SemanticTokens; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.LanguageServer.Semantic; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/SignatureHelp/SignatureHelpEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/SignatureHelp/SignatureHelpEndpoint.cs index 790cd537f07..f06cde3cf74 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/SignatureHelp/SignatureHelpEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/SignatureHelp/SignatureHelpEndpoint.cs @@ -10,7 +10,6 @@ using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.SignatureHelp; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/SpellCheck/DocumentSpellCheckEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/SpellCheck/DocumentSpellCheckEndpoint.cs index ca84457a042..60d0332d046 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/SpellCheck/DocumentSpellCheckEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/SpellCheck/DocumentSpellCheckEndpoint.cs @@ -14,7 +14,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.SpellCheck; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/SpellCheck/WorkspaceSpellCheckEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/SpellCheck/WorkspaceSpellCheckEndpoint.cs index ae7a2195b0f..2b7ed9b8bfa 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/SpellCheck/WorkspaceSpellCheckEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/SpellCheck/WorkspaceSpellCheckEndpoint.cs @@ -6,7 +6,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.LanguageServer.EndpointContracts; using Microsoft.AspNetCore.Razor.Threading; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.SpellCheck; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Tooltip/DefaultLSPTagHelperTooltipFactory.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Tooltip/DefaultLSPTagHelperTooltipFactory.cs index e51fbbdcb2e..14ba1853e45 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Tooltip/DefaultLSPTagHelperTooltipFactory.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Tooltip/DefaultLSPTagHelperTooltipFactory.cs @@ -11,7 +11,6 @@ using Microsoft.AspNetCore.Razor.PooledObjects; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Tooltip; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Tooltip; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Tooltip/LSPTagHelperTooltipFactory.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Tooltip/LSPTagHelperTooltipFactory.cs index e8dc72e35ef..af0dc26bb6a 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Tooltip/LSPTagHelperTooltipFactory.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Tooltip/LSPTagHelperTooltipFactory.cs @@ -7,7 +7,6 @@ using Microsoft.AspNetCore.Razor.LanguageServer.ProjectSystem; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Tooltip; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Tooltip; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/WorkspaceSemanticTokensRefreshNotifier.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/WorkspaceSemanticTokensRefreshNotifier.cs index af8ae8a3d26..186f4eb9c32 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/WorkspaceSemanticTokensRefreshNotifier.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/WorkspaceSemanticTokensRefreshNotifier.cs @@ -6,7 +6,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.LanguageServer.Hosting; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Threading; namespace Microsoft.AspNetCore.Razor.LanguageServer; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/WrapWithTag/WrapWithTagEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/WrapWithTag/WrapWithTagEndpoint.cs index b290be86aef..5aad831013f 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/WrapWithTag/WrapWithTagEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/WrapWithTag/WrapWithTagEndpoint.cs @@ -13,7 +13,6 @@ using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.WrapWithTag; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/WrapWithTag/WrapWithTagParams.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/WrapWithTag/WrapWithTagParams.cs index 65892849b52..68a74a73b74 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/WrapWithTag/WrapWithTagParams.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/WrapWithTag/WrapWithTagParams.cs @@ -2,8 +2,6 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; -using Newtonsoft.Json; namespace Microsoft.AspNetCore.Razor.LanguageServer.WrapWithTag; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/WrapWithTag/WrapWithTagResponse.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/WrapWithTag/WrapWithTagResponse.cs index 1f580332c7d..a4130b83329 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/WrapWithTag/WrapWithTagResponse.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/WrapWithTag/WrapWithTagResponse.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.WrapWithTag; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DebuggerDisplay.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DebuggerDisplay.cs index 986350fb436..c0058d8d05c 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DebuggerDisplay.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DebuggerDisplay.cs @@ -2,6 +2,5 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using System.Diagnostics; -using Microsoft.VisualStudio.LanguageServer.Protocol; [assembly: DebuggerDisplay("{Label} ({Kind})", Target = typeof(CompletionItem))] diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentMapping/AbstractRazorDocumentMappingService.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentMapping/AbstractRazorDocumentMappingService.cs index 96f490aa9cd..11ca138901c 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentMapping/AbstractRazorDocumentMappingService.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentMapping/AbstractRazorDocumentMappingService.cs @@ -17,7 +17,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.DocumentMapping; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentMapping/DocumentPositionInfo.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentMapping/DocumentPositionInfo.cs index cfc2ad81629..6aef65fc328 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentMapping/DocumentPositionInfo.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentMapping/DocumentPositionInfo.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.DocumentMapping; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentMapping/IRazorDocumentMappingService.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentMapping/IRazorDocumentMappingService.cs index 358235732a6..31acd7b0b49 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentMapping/IRazorDocumentMappingService.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentMapping/IRazorDocumentMappingService.cs @@ -7,7 +7,6 @@ using Microsoft.AspNetCore.Razor.Language; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.DocumentMapping; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentMapping/IRazorDocumentMappingServiceExtensions.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentMapping/IRazorDocumentMappingServiceExtensions.cs index 13d96a0790e..3040e018053 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentMapping/IRazorDocumentMappingServiceExtensions.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentMapping/IRazorDocumentMappingServiceExtensions.cs @@ -9,8 +9,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.CodeAnalysis.Razor.DocumentMapping; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/FoldingRanges/AbstractSyntaxNodeFoldingProvider.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/FoldingRanges/AbstractSyntaxNodeFoldingProvider.cs index 58e81b4112c..36fed29db91 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/FoldingRanges/AbstractSyntaxNodeFoldingProvider.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/FoldingRanges/AbstractSyntaxNodeFoldingProvider.cs @@ -1,15 +1,16 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See License.txt in the project root for license information. + using System.Collections.Immutable; using Microsoft.AspNetCore.Razor.Language; using Microsoft.AspNetCore.Razor.Language.Syntax; using Microsoft.AspNetCore.Razor.PooledObjects; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.FoldingRanges; + internal abstract class AbstractSyntaxNodeFoldingProvider : IRazorFoldingRangeProvider where TNode : RazorSyntaxNode { diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/FoldingRanges/FoldingRangeService.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/FoldingRanges/FoldingRangeService.cs index def3567e4b3..246d8c77399 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/FoldingRanges/FoldingRangeService.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/FoldingRanges/FoldingRangeService.cs @@ -12,7 +12,6 @@ using Microsoft.CodeAnalysis.Razor.DocumentMapping; using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.FoldingRanges; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/FoldingRanges/IFoldingRangeService.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/FoldingRanges/IFoldingRangeService.cs index 2f28b71db11..681cc651fbb 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/FoldingRanges/IFoldingRangeService.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/FoldingRanges/IFoldingRangeService.cs @@ -4,7 +4,6 @@ using System.Collections.Immutable; using System.Threading; using Microsoft.AspNetCore.Razor.Language; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.FoldingRanges; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/FoldingRanges/IRazorFoldingRangeProvider.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/FoldingRanges/IRazorFoldingRangeProvider.cs index 857d6f4e8bc..e2bba9fb000 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/FoldingRanges/IRazorFoldingRangeProvider.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/FoldingRanges/IRazorFoldingRangeProvider.cs @@ -3,7 +3,6 @@ using System.Collections.Immutable; using Microsoft.AspNetCore.Razor.Language; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.FoldingRanges; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/FoldingRanges/RazorFileUsingsFoldingSyntaxWalker.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/FoldingRanges/RazorFileUsingsFoldingSyntaxWalker.cs index 6dd4a046bf8..6d0618f0535 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/FoldingRanges/RazorFileUsingsFoldingSyntaxWalker.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/FoldingRanges/RazorFileUsingsFoldingSyntaxWalker.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using Microsoft.AspNetCore.Razor.Language; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.FoldingRanges; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/FoldingRanges/UsingsFoldingRangeProvider.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/FoldingRanges/UsingsFoldingRangeProvider.cs index b04767e106f..925e70e64f2 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/FoldingRanges/UsingsFoldingRangeProvider.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/FoldingRanges/UsingsFoldingRangeProvider.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Collections.Immutable; using Microsoft.AspNetCore.Razor.Language; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.FoldingRanges; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/ICapabilitiesProvider.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/ICapabilitiesProvider.cs index e878ebdcd02..1bd61eb7102 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/ICapabilitiesProvider.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/ICapabilitiesProvider.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See License.txt in the project root for license information. -using Microsoft.VisualStudio.LanguageServer.Protocol; - namespace Microsoft.AspNetCore.Razor.LanguageServer; internal interface ICapabilitiesProvider diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/DocumentContext.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/DocumentContext.cs index 36a01ebd20f..7771b82d93c 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/DocumentContext.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/DocumentContext.cs @@ -7,7 +7,6 @@ using Microsoft.AspNetCore.Razor; using Microsoft.AspNetCore.Razor.Language; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.ProjectSystem; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/IDocumentContextFactory.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/IDocumentContextFactory.cs index 6eb544326ec..1271a6b89fd 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/IDocumentContextFactory.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/IDocumentContextFactory.cs @@ -3,7 +3,6 @@ using System; using System.Diagnostics.CodeAnalysis; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.ProjectSystem; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/IDocumentContextFactoryExtensions.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/IDocumentContextFactoryExtensions.cs index 519212b9df7..e15ef4aa6f6 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/IDocumentContextFactoryExtensions.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/IDocumentContextFactoryExtensions.cs @@ -3,7 +3,6 @@ using System; using System.Diagnostics.CodeAnalysis; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.ProjectSystem; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/VersionedDocumentContext.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/VersionedDocumentContext.cs index b203540027e..deae82a1e75 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/VersionedDocumentContext.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/VersionedDocumentContext.cs @@ -3,7 +3,6 @@ using System; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.ProjectSystem; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/CodeActions/FormatNewFileParams.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/CodeActions/FormatNewFileParams.cs index 6c2f5d4b282..4fa3b5b7fbd 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/CodeActions/FormatNewFileParams.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/CodeActions/FormatNewFileParams.cs @@ -3,7 +3,6 @@ using System.Runtime.Serialization; using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.Protocol.CodeActions; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/CodeActions/RazorResolveCodeActionParams.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/CodeActions/RazorResolveCodeActionParams.cs index 4ecf43d0505..5e82598af39 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/CodeActions/RazorResolveCodeActionParams.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/CodeActions/RazorResolveCodeActionParams.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.Protocol.CodeActions; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/CodeActions/SimplifyMethodParams.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/CodeActions/SimplifyMethodParams.cs index 516afa1fd4d..2a25dd30c47 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/CodeActions/SimplifyMethodParams.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/CodeActions/SimplifyMethodParams.cs @@ -3,7 +3,6 @@ using System.Runtime.Serialization; using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.Protocol.CodeActions; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/CodeActions/VSCodeActionParams.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/CodeActions/VSCodeActionParams.cs index ae017574b92..b4b892e4671 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/CodeActions/VSCodeActionParams.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/CodeActions/VSCodeActionParams.cs @@ -3,7 +3,6 @@ using System.Runtime.Serialization; using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.Protocol.CodeActions; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/ColorPresentation/ColorPresentation.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/ColorPresentation/ColorPresentation.cs index d8f678ac6bc..28b363af3c1 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/ColorPresentation/ColorPresentation.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/ColorPresentation/ColorPresentation.cs @@ -4,7 +4,6 @@ #nullable disable using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.Protocol.ColorPresentation; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/ColorPresentation/ColorPresentationParams.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/ColorPresentation/ColorPresentationParams.cs index e56dfddec45..11a2cfc3ce4 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/ColorPresentation/ColorPresentationParams.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/ColorPresentation/ColorPresentationParams.cs @@ -4,7 +4,6 @@ #nullable disable using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.Protocol.ColorPresentation; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/ColorPresentation/DelegatedDocumentColorParams.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/ColorPresentation/DelegatedDocumentColorParams.cs index 89729afc428..6c5709be2a3 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/ColorPresentation/DelegatedDocumentColorParams.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/ColorPresentation/DelegatedDocumentColorParams.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.Protocol.ColorPresentation; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Completion/RazorInlineCompletionRequest.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Completion/RazorInlineCompletionRequest.cs index 2c4a0a6b689..07aaf76af78 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Completion/RazorInlineCompletionRequest.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Completion/RazorInlineCompletionRequest.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.Protocol.Completion; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Debugging/RazorBreakpointSpanParams.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Debugging/RazorBreakpointSpanParams.cs index f486bc6230f..cd1b8c17480 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Debugging/RazorBreakpointSpanParams.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Debugging/RazorBreakpointSpanParams.cs @@ -3,7 +3,6 @@ using System; using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.Protocol.Debugging; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Debugging/RazorBreakpointSpanResponse.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Debugging/RazorBreakpointSpanResponse.cs index c12d63eb605..cfafecfbd05 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Debugging/RazorBreakpointSpanResponse.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Debugging/RazorBreakpointSpanResponse.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.Protocol.Debugging; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Debugging/RazorProximityExpressionsParams.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Debugging/RazorProximityExpressionsParams.cs index d56edee55b7..edbd8a9219b 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Debugging/RazorProximityExpressionsParams.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Debugging/RazorProximityExpressionsParams.cs @@ -3,7 +3,6 @@ using System; using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.Protocol.Debugging; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DelegatedTypes.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DelegatedTypes.cs index ff1b67da580..fee959c6efa 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DelegatedTypes.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DelegatedTypes.cs @@ -10,7 +10,6 @@ namespace Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; internal record DelegatedSpellCheckParams( [property: JsonPropertyName("identifier")] TextDocumentIdentifierAndVersion Identifier); diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Diagnostics/RazorPullDiagnosticResponse.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Diagnostics/RazorPullDiagnosticResponse.cs index 91ee4523003..a619552fde2 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Diagnostics/RazorPullDiagnosticResponse.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Diagnostics/RazorPullDiagnosticResponse.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.Protocol.Diagnostics; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentHighlight/RemoteDocumentHighlight.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentHighlight/RemoteDocumentHighlight.cs index d54f064a04a..2dbe5a47bf8 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentHighlight/RemoteDocumentHighlight.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentHighlight/RemoteDocumentHighlight.cs @@ -3,7 +3,6 @@ using System.Runtime.Serialization; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using static Roslyn.LanguageServer.Protocol.LspExtensions; using RoslynDocumentHighlight = Roslyn.LanguageServer.Protocol.DocumentHighlight; using VsDocumentHighlight = Microsoft.VisualStudio.LanguageServer.Protocol.DocumentHighlight; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentMapping/RazorMapToDocumentRangesParams.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentMapping/RazorMapToDocumentRangesParams.cs index d9bc9acc59c..78137566d81 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentMapping/RazorMapToDocumentRangesParams.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentMapping/RazorMapToDocumentRangesParams.cs @@ -4,7 +4,6 @@ using System; using System.Text.Json.Serialization; using Microsoft.CodeAnalysis.Razor.DocumentMapping; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.CodeAnalysis.Razor.Protocol.DocumentMapping; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentMapping/RazorMapToDocumentRangesResponse.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentMapping/RazorMapToDocumentRangesResponse.cs index 60e5f99fbc4..8692fa83020 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentMapping/RazorMapToDocumentRangesResponse.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentMapping/RazorMapToDocumentRangesResponse.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.Protocol.DocumentMapping; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentPresentation/IPresentationParams.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentPresentation/IPresentationParams.cs index 374c2f7c136..9e3916a3254 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentPresentation/IPresentationParams.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentPresentation/IPresentationParams.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See License.txt in the project root for license information. -using Microsoft.VisualStudio.LanguageServer.Protocol; - namespace Microsoft.CodeAnalysis.Razor.Protocol.DocumentPresentation; internal interface IPresentationParams diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentPresentation/TextPresentationParams.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentPresentation/TextPresentationParams.cs index 8e5efe7327d..dde9959fc0a 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentPresentation/TextPresentationParams.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentPresentation/TextPresentationParams.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See License.txt in the project root for license information. -using Microsoft.VisualStudio.LanguageServer.Protocol; - namespace Microsoft.CodeAnalysis.Razor.Protocol.DocumentPresentation; /// diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentPresentation/UriPresentationParams.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentPresentation/UriPresentationParams.cs index 0bd8aa3fe21..aab83fadf5b 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentPresentation/UriPresentationParams.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentPresentation/UriPresentationParams.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See License.txt in the project root for license information. -using Microsoft.VisualStudio.LanguageServer.Protocol; - namespace Microsoft.CodeAnalysis.Razor.Protocol.DocumentPresentation; /// diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Folding/RazorFoldingRangeRequestParam.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Folding/RazorFoldingRangeRequestParam.cs index 90b07fe6ad2..6b73e90c6b1 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Folding/RazorFoldingRangeRequestParam.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Folding/RazorFoldingRangeRequestParam.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.Protocol.Folding; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Folding/RazorFoldingRangeResponse.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Folding/RazorFoldingRangeResponse.cs index b08e8a162c7..c39b0968321 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Folding/RazorFoldingRangeResponse.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Folding/RazorFoldingRangeResponse.cs @@ -3,7 +3,6 @@ using System.Collections.Immutable; using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.Protocol.Folding; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Folding/RemoteFoldingRange.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Folding/RemoteFoldingRange.cs index 59d83bb8603..ea5883997db 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Folding/RemoteFoldingRange.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Folding/RemoteFoldingRange.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using System.Runtime.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.Protocol.Folding; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Formatting/RazorDocumentFormattingParams.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Formatting/RazorDocumentFormattingParams.cs index c4a4f7cceb3..d7b3047ba22 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Formatting/RazorDocumentFormattingParams.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Formatting/RazorDocumentFormattingParams.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.Protocol.Formatting; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Formatting/RazorDocumentFormattingResponse.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Formatting/RazorDocumentFormattingResponse.cs index b9cb31f7344..4601480b045 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Formatting/RazorDocumentFormattingResponse.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Formatting/RazorDocumentFormattingResponse.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.Protocol.Formatting; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Formatting/RazorDocumentOnTypeFormattingParams.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Formatting/RazorDocumentOnTypeFormattingParams.cs index 818c49d9197..3162fbec804 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Formatting/RazorDocumentOnTypeFormattingParams.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Formatting/RazorDocumentOnTypeFormattingParams.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.Protocol.Formatting; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/IClientCapabilitiesService.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/IClientCapabilitiesService.cs index c8d26fd18c6..53c5c1aa096 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/IClientCapabilitiesService.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/IClientCapabilitiesService.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See License.txt in the project root for license information. -using Microsoft.VisualStudio.LanguageServer.Protocol; - namespace Microsoft.CodeAnalysis.Razor.Protocol; internal interface IClientCapabilitiesService diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/SemanticTokens/ProvideSemanticTokensRangesParams.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/SemanticTokens/ProvideSemanticTokensRangesParams.cs index 4a47066f3b8..b2d4d72078e 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/SemanticTokens/ProvideSemanticTokensRangesParams.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/SemanticTokens/ProvideSemanticTokensRangesParams.cs @@ -3,8 +3,6 @@ using System; using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.CodeAnalysis.Razor.Workspaces.Protocol.SemanticTokens; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/SemanticTokens/SemanticTokensRangesParams.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/SemanticTokens/SemanticTokensRangesParams.cs index 10864b93015..f6f7239723d 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/SemanticTokens/SemanticTokensRangesParams.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/SemanticTokens/SemanticTokensRangesParams.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.Workspaces.Protocol.SemanticTokens; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/TextDocumentIdentifierAndVersion.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/TextDocumentIdentifierAndVersion.cs index 90156f1ab1d..dac57219617 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/TextDocumentIdentifierAndVersion.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/TextDocumentIdentifierAndVersion.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Razor.Protocol; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/Debugging/RazorBreakpointResolver.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/Debugging/RazorBreakpointResolver.cs index b3f61e9e008..e740560262f 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/Debugging/RazorBreakpointResolver.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/Debugging/RazorBreakpointResolver.cs @@ -4,7 +4,6 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.VisualStudio.Text; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.VisualStudio.Razor.Debugging; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostDocumentHighlightPresentationEndpoint.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostDocumentHighlightPresentationEndpoint.cs index e832f7561d8..9dc3095ef81 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostDocumentHighlightPresentationEndpoint.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostDocumentHighlightPresentationEndpoint.cs @@ -12,7 +12,6 @@ using Microsoft.CodeAnalysis.Razor.Remote; using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.LanguageClient.Extensions; namespace Microsoft.VisualStudio.Razor.LanguageClient.Cohost; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostFoldingRangeEndpoint.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostFoldingRangeEndpoint.cs index be3ab94f529..206029360da 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostFoldingRangeEndpoint.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostFoldingRangeEndpoint.cs @@ -14,7 +14,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol.Folding; using Microsoft.CodeAnalysis.Razor.Remote; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.LanguageClient.Extensions; namespace Microsoft.VisualStudio.Razor.LanguageClient.Cohost; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostLinkedEditingRangeEndpoint.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostLinkedEditingRangeEndpoint.cs index f1f42f472dc..d18514cbbdf 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostLinkedEditingRangeEndpoint.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostLinkedEditingRangeEndpoint.cs @@ -12,7 +12,6 @@ using Microsoft.CodeAnalysis.Razor.Remote; using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.LanguageClient.Extensions; namespace Microsoft.VisualStudio.Razor.LanguageClient.Cohost; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostSemanticTokensRangeEndpoint.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostSemanticTokensRangeEndpoint.cs index 77504ae52e2..d2ad1dd28f5 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostSemanticTokensRangeEndpoint.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostSemanticTokensRangeEndpoint.cs @@ -15,7 +15,6 @@ using Microsoft.CodeAnalysis.Razor.Remote; using Microsoft.CodeAnalysis.Razor.SemanticTokens; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.LanguageClient.Extensions; using Microsoft.VisualStudio.Razor.Settings; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostSignatureHelpEndpoint.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostSignatureHelpEndpoint.cs index 030a6bec70c..1015b78c820 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostSignatureHelpEndpoint.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostSignatureHelpEndpoint.cs @@ -12,7 +12,6 @@ using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.Remote; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.LanguageClient; using Microsoft.VisualStudio.Razor.LanguageClient.Cohost; using Microsoft.VisualStudio.Razor.LanguageClient.Extensions; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostUriPresentationEndpoint.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostUriPresentationEndpoint.cs index 4582ca61358..4a7ac791ebb 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostUriPresentationEndpoint.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostUriPresentationEndpoint.cs @@ -11,7 +11,6 @@ using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Text; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.LanguageClient.Extensions; namespace Microsoft.VisualStudio.Razor.LanguageClient.Cohost; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/IDynamicRegistrationProvider.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/IDynamicRegistrationProvider.cs index d3c23b8d4c7..e4574aa45df 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/IDynamicRegistrationProvider.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/IDynamicRegistrationProvider.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using Microsoft.CodeAnalysis.ExternalAccess.Razor.Cohost; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.VisualStudio.Razor.LanguageClient.Cohost; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/RazorCohostClientCapabilitiesService.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/RazorCohostClientCapabilitiesService.cs index cde4f43bbd8..8354226b4ee 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/RazorCohostClientCapabilitiesService.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/RazorCohostClientCapabilitiesService.cs @@ -4,7 +4,6 @@ using System; using System.ComponentModel.Composition; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.VisualStudio.Razor.LanguageClient.Cohost; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/RazorCohostDynamicRegistrationService.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/RazorCohostDynamicRegistrationService.cs index 29d86c5cb60..c5b63e2ccf7 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/RazorCohostDynamicRegistrationService.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/RazorCohostDynamicRegistrationService.cs @@ -10,7 +10,6 @@ using Microsoft.AspNetCore.Razor.PooledObjects; using Microsoft.CodeAnalysis.ExternalAccess.Razor.Cohost; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.VisualStudio.Razor.LanguageClient.Cohost; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultLSPBreakpointSpanProvider.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultLSPBreakpointSpanProvider.cs index 0e8a266c328..bd294670d09 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultLSPBreakpointSpanProvider.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultLSPBreakpointSpanProvider.cs @@ -9,8 +9,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.Debugging; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using Microsoft.VisualStudio.LanguageServer.Protocol; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.VisualStudio.Razor.LanguageClient.Debugging; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultLSPProximityExpressionsProvider.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultLSPProximityExpressionsProvider.cs index 1452ca9f165..494937c74c8 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultLSPProximityExpressionsProvider.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultLSPProximityExpressionsProvider.cs @@ -10,7 +10,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.Debugging; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.VisualStudio.Razor.LanguageClient.Debugging; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultRazorBreakpointResolver.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultRazorBreakpointResolver.cs index 690631253fe..555962772bc 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultRazorBreakpointResolver.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultRazorBreakpointResolver.cs @@ -8,10 +8,8 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.Utilities; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.Debugging; using Microsoft.VisualStudio.Text; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.VisualStudio.Razor.LanguageClient.Debugging; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultRazorProximityExpressionResolver.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultRazorProximityExpressionResolver.cs index e271c871aea..49c17fb9956 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultRazorProximityExpressionResolver.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/DefaultRazorProximityExpressionResolver.cs @@ -9,7 +9,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.Utilities; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.Debugging; using Microsoft.VisualStudio.Text; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/LSPBreakpointSpanProvider.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/LSPBreakpointSpanProvider.cs index 0c1a05b4b7b..f78eaae24c4 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/LSPBreakpointSpanProvider.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/LSPBreakpointSpanProvider.cs @@ -4,7 +4,6 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.VisualStudio.Razor.LanguageClient.Debugging; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/LSPProximityExpressionsProvider.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/LSPProximityExpressionsProvider.cs index 20747767e8a..930034ba513 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/LSPProximityExpressionsProvider.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/LSPProximityExpressionsProvider.cs @@ -5,7 +5,6 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.VisualStudio.Razor.LanguageClient.Debugging; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/DocumentMapping/DefaultLSPDocumentMappingProvider.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/DocumentMapping/DefaultLSPDocumentMappingProvider.cs index 1663a966be4..fb21d226b15 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/DocumentMapping/DefaultLSPDocumentMappingProvider.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/DocumentMapping/DefaultLSPDocumentMappingProvider.cs @@ -9,7 +9,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.DocumentMapping; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.VisualStudio.Razor.LanguageClient.DocumentMapping; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/DocumentMapping/LSPDocumentMappingProvider.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/DocumentMapping/LSPDocumentMappingProvider.cs index 16e5bf80dd2..7bd730ada6e 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/DocumentMapping/LSPDocumentMappingProvider.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/DocumentMapping/LSPDocumentMappingProvider.cs @@ -6,7 +6,6 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.DocumentMapping; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.VisualStudio.Razor.LanguageClient.DocumentMapping; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget.cs index 1ae779026f7..45303931715 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget.cs @@ -15,7 +15,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.LanguageClient.Cohost; using Microsoft.VisualStudio.Razor.Settings; using Microsoft.VisualStudio.Razor.Snippets; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_CodeActions.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_CodeActions.cs index 60384baa0af..cf329b4a649 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_CodeActions.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_CodeActions.cs @@ -9,7 +9,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.CodeActions; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Threading; using StreamJsonRpc; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_Completion.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_Completion.cs index 329f5b82375..168ea5cf15c 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_Completion.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_Completion.cs @@ -10,7 +10,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.Completion; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.LanguageClient.Extensions; using Microsoft.VisualStudio.Razor.Snippets; using StreamJsonRpc; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_Diagnostics.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_Diagnostics.cs index 0ac519a37af..0d9755b548d 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_Diagnostics.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_Diagnostics.cs @@ -8,7 +8,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.Diagnostics; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.LanguageClient.Extensions; using StreamJsonRpc; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_DocumentColor.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_DocumentColor.cs index c43276e66bf..a3657435fa9 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_DocumentColor.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_DocumentColor.cs @@ -7,7 +7,6 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.ColorPresentation; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Threading; using StreamJsonRpc; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_DocumentSymbol.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_DocumentSymbol.cs index 99ffec04426..c67ce0e2850 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_DocumentSymbol.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_DocumentSymbol.cs @@ -4,7 +4,6 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.LanguageClient.Extensions; using StreamJsonRpc; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_FoldingRange.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_FoldingRange.cs index a9be7721d86..d82a59e8c7d 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_FoldingRange.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_FoldingRange.cs @@ -8,7 +8,6 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.Folding; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.LanguageClient.Extensions; using StreamJsonRpc; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_HtmlFormatting.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_HtmlFormatting.cs index a50e120f2e8..3a6a703602f 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_HtmlFormatting.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_HtmlFormatting.cs @@ -7,7 +7,6 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.Formatting; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.LanguageClient.Extensions; using StreamJsonRpc; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_InlayHints.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_InlayHints.cs index 0930e048132..14405577086 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_InlayHints.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_InlayHints.cs @@ -4,7 +4,6 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.LanguageClient.Extensions; using StreamJsonRpc; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_MapCode.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_MapCode.cs index bf8e5a895ee..eb2c49ebc06 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_MapCode.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_MapCode.cs @@ -4,7 +4,6 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.LanguageClient.Extensions; using StreamJsonRpc; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_OnAutoInsert.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_OnAutoInsert.cs index 603053b273d..d94aa3913d6 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_OnAutoInsert.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_OnAutoInsert.cs @@ -4,7 +4,6 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.LanguageClient.Extensions; using StreamJsonRpc; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_Presentation.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_Presentation.cs index db045614f14..9d2337ff89a 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_Presentation.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_Presentation.cs @@ -7,7 +7,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.DocumentPresentation; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using Microsoft.VisualStudio.LanguageServer.Protocol; using StreamJsonRpc; namespace Microsoft.VisualStudio.Razor.LanguageClient.Endpoints; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_ProjectContexts.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_ProjectContexts.cs index 4b3923fc082..3afe12c8fb6 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_ProjectContexts.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_ProjectContexts.cs @@ -7,7 +7,6 @@ using Microsoft.AspNetCore.Razor.Threading; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.DynamicFiles; using StreamJsonRpc; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_Rename.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_Rename.cs index 4bb2b66677d..fd8a5ec1e38 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_Rename.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_Rename.cs @@ -4,7 +4,6 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.LanguageClient.Extensions; using StreamJsonRpc; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_SemanticTokens.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_SemanticTokens.cs index 1d895280ad4..1c2b4f502b5 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_SemanticTokens.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_SemanticTokens.cs @@ -9,7 +9,6 @@ using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces.Protocol.SemanticTokens; -using Microsoft.VisualStudio.LanguageServer.Protocol; using StreamJsonRpc; namespace Microsoft.VisualStudio.Razor.LanguageClient.Endpoints; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_SimplifyMethod.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_SimplifyMethod.cs index f1ac1f0567e..5ba517d603e 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_SimplifyMethod.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_SimplifyMethod.cs @@ -5,7 +5,6 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.CodeActions; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.LanguageClient.Extensions; using StreamJsonRpc; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_SpellCheck.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_SpellCheck.cs index ba4b1a825fc..09880731e09 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_SpellCheck.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_SpellCheck.cs @@ -5,7 +5,6 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.LanguageClient.Extensions; using StreamJsonRpc; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_TextDocumentPosition.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_TextDocumentPosition.cs index 5c11db83526..9ddbad0386e 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_TextDocumentPosition.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_TextDocumentPosition.cs @@ -4,7 +4,6 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; using StreamJsonRpc; namespace Microsoft.VisualStudio.Razor.LanguageClient.Endpoints; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_ValidateBreakpoint.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_ValidateBreakpoint.cs index c0e2ce15b1e..11d3394c450 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_ValidateBreakpoint.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_ValidateBreakpoint.cs @@ -4,7 +4,6 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.LanguageClient.Extensions; using StreamJsonRpc; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_WorkspaceConfiguration.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_WorkspaceConfiguration.cs index 0cc9fd60ae4..8e948c297aa 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_WorkspaceConfiguration.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_WorkspaceConfiguration.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -using Microsoft.VisualStudio.LanguageServer.Protocol; using StreamJsonRpc; namespace Microsoft.VisualStudio.Razor.LanguageClient.Endpoints; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_WrapWithTag.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_WrapWithTag.cs index 580c41628e3..9a87e888a71 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_WrapWithTag.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_WrapWithTag.cs @@ -6,7 +6,6 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.LanguageClient.WrapWithTag; using StreamJsonRpc; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Extensions/TextDocumentExtensions.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Extensions/TextDocumentExtensions.cs index 14c3bd36ce5..a4116aab58b 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Extensions/TextDocumentExtensions.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Extensions/TextDocumentExtensions.cs @@ -3,7 +3,6 @@ using System; using Microsoft.CodeAnalysis.ExternalAccess.Razor.Cohost; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.VisualStudio.Razor.LanguageClient.Extensions; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/RazorCSharpInterceptionMiddleLayer.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/RazorCSharpInterceptionMiddleLayer.cs index b2f6692ba35..ec1f2d95c09 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/RazorCSharpInterceptionMiddleLayer.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/RazorCSharpInterceptionMiddleLayer.cs @@ -10,7 +10,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces.Protocol.SemanticTokens; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Newtonsoft.Json.Linq; namespace Microsoft.VisualStudio.Razor.LanguageClient; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/RazorLSPSpanMappingService.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/RazorLSPSpanMappingService.cs index 5775f527c9c..314fdd9ad07 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/RazorLSPSpanMappingService.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/RazorLSPSpanMappingService.cs @@ -14,7 +14,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol.DocumentMapping; using Microsoft.CodeAnalysis.Text; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.LanguageClient.DocumentMapping; using Microsoft.VisualStudio.Text; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/WorkspaceConfigurationChangedListener.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/WorkspaceConfigurationChangedListener.cs index a2ec0e79fdc..63fa7529943 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/WorkspaceConfigurationChangedListener.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/WorkspaceConfigurationChangedListener.cs @@ -5,7 +5,6 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.Settings; namespace Microsoft.VisualStudio.Razor.LanguageClient; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/WrapWithTag/VSInternalWrapWithTagParams.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/WrapWithTag/VSInternalWrapWithTagParams.cs index b9b4d7ff394..a34dfdfa905 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/WrapWithTag/VSInternalWrapWithTagParams.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/WrapWithTag/VSInternalWrapWithTagParams.cs @@ -3,7 +3,6 @@ using System.Runtime.Serialization; using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.VisualStudio.Razor.LanguageClient.WrapWithTag; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/WrapWithTag/VSInternalWrapWithTagResponse.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/WrapWithTag/VSInternalWrapWithTagResponse.cs index 35316bc2909..5d6f34aea75 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/WrapWithTag/VSInternalWrapWithTagResponse.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/WrapWithTag/VSInternalWrapWithTagResponse.cs @@ -3,7 +3,6 @@ using System.Runtime.Serialization; using System.Text.Json.Serialization; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.VisualStudio.Razor.LanguageClient.WrapWithTag; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/AutoInsert/OnAutoInsertEndpointTest.NetFx.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/AutoInsert/OnAutoInsertEndpointTest.NetFx.cs index 6ae6e6bdb80..f31d255a157 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/AutoInsert/OnAutoInsertEndpointTest.NetFx.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/AutoInsert/OnAutoInsertEndpointTest.NetFx.cs @@ -8,7 +8,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; namespace Microsoft.AspNetCore.Razor.LanguageServer.AutoInsert; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/AutoInsert/OnAutoInsertEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/AutoInsert/OnAutoInsertEndpointTest.cs index 4e71963389a..9c379a05f7b 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/AutoInsert/OnAutoInsertEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/AutoInsert/OnAutoInsertEndpointTest.cs @@ -7,7 +7,6 @@ using Microsoft.AspNetCore.Razor.Language; using Microsoft.AspNetCore.Razor.LanguageServer.Formatting; using Microsoft.AspNetCore.Razor.LanguageServer.Test; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/AutoInsert/PreferHtmlInAttributeValuesDocumentPositionInfoStrategyTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/AutoInsert/PreferHtmlInAttributeValuesDocumentPositionInfoStrategyTest.cs index 5b72597e19c..bccca45834f 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/AutoInsert/PreferHtmlInAttributeValuesDocumentPositionInfoStrategyTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/AutoInsert/PreferHtmlInAttributeValuesDocumentPositionInfoStrategyTest.cs @@ -7,7 +7,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/AutoInsert/RazorOnAutoInsertProviderTestBase.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/AutoInsert/RazorOnAutoInsertProviderTestBase.cs index cef29ea2d43..db4e19718f0 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/AutoInsert/RazorOnAutoInsertProviderTestBase.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/AutoInsert/RazorOnAutoInsertProviderTestBase.cs @@ -13,7 +13,6 @@ using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/AddUsingsCodeActionResolverTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/AddUsingsCodeActionResolverTest.cs index 7d22fc8ee82..40355525374 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/AddUsingsCodeActionResolverTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/AddUsingsCodeActionResolverTest.cs @@ -10,7 +10,6 @@ using Microsoft.AspNetCore.Razor.LanguageServer.CodeActions.Models; using Microsoft.AspNetCore.Razor.Test.Common.LanguageServer; using Microsoft.CodeAnalysis.Razor.ProjectSystem; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CSharp/DefaultCSharpCodeActionProviderTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CSharp/DefaultCSharpCodeActionProviderTest.cs index 2d9ca497c73..a84f05c7507 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CSharp/DefaultCSharpCodeActionProviderTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CSharp/DefaultCSharpCodeActionProviderTest.cs @@ -15,7 +15,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol.CodeActions; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CSharp/DefaultCSharpCodeActionResolverTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CSharp/DefaultCSharpCodeActionResolverTest.cs index 2dc1288ab2b..777cf9a19b3 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CSharp/DefaultCSharpCodeActionResolverTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CSharp/DefaultCSharpCodeActionResolverTest.cs @@ -15,7 +15,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.CodeActions; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CSharp/TypeAccessibilityCodeActionProviderTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CSharp/TypeAccessibilityCodeActionProviderTest.cs index 4432a1bf83e..f930b4fa407 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CSharp/TypeAccessibilityCodeActionProviderTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CSharp/TypeAccessibilityCodeActionProviderTest.cs @@ -16,7 +16,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.CodeActions; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CodeActionEndToEndTest.NetFx.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CodeActionEndToEndTest.NetFx.cs index 2196a72ccfa..2da62f6d05c 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CodeActionEndToEndTest.NetFx.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CodeActionEndToEndTest.NetFx.cs @@ -28,7 +28,6 @@ using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Roslyn.Test.Utilities; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CodeActionEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CodeActionEndpointTest.cs index 76515aa9b92..b378d30988a 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CodeActionEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CodeActionEndpointTest.cs @@ -19,7 +19,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol.CodeActions; using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CodeActionResolutionEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CodeActionResolutionEndpointTest.cs index e84c93d22e0..d1451bf9173 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CodeActionResolutionEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CodeActionResolutionEndpointTest.cs @@ -10,7 +10,6 @@ using Microsoft.AspNetCore.Razor.Test.Common.LanguageServer; using Microsoft.AspNetCore.Razor.Threading; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Html/DefaultHtmlCodeActionProviderTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Html/DefaultHtmlCodeActionProviderTest.cs index 8c21b56f374..57678844573 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Html/DefaultHtmlCodeActionProviderTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Html/DefaultHtmlCodeActionProviderTest.cs @@ -14,7 +14,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol.CodeActions; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Html/DefaultHtmlCodeActionResolverTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Html/DefaultHtmlCodeActionResolverTest.cs index 2d7d9b67d38..9216e59f2b5 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Html/DefaultHtmlCodeActionResolverTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Html/DefaultHtmlCodeActionResolverTest.cs @@ -15,7 +15,6 @@ using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Razor/ComponentAccessibilityCodeActionProviderTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Razor/ComponentAccessibilityCodeActionProviderTest.cs index cc0f250405f..5b972ba7a63 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Razor/ComponentAccessibilityCodeActionProviderTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Razor/ComponentAccessibilityCodeActionProviderTest.cs @@ -12,7 +12,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol.CodeActions; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Razor/CreateComponentCodeActionResolverTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Razor/CreateComponentCodeActionResolverTest.cs index f44e40ddd6f..b6c5a8cfb4e 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Razor/CreateComponentCodeActionResolverTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Razor/CreateComponentCodeActionResolverTest.cs @@ -11,7 +11,6 @@ using Microsoft.AspNetCore.Razor.Test.Common.Workspaces; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Razor.ProjectSystem; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Razor/ExtractToCodeBehindCodeActionProviderTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Razor/ExtractToCodeBehindCodeActionProviderTest.cs index 61c8fb4efed..7c67a61ecfe 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Razor/ExtractToCodeBehindCodeActionProviderTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Razor/ExtractToCodeBehindCodeActionProviderTest.cs @@ -15,7 +15,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol.CodeActions; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Razor/ExtractToCodeBehindCodeActionResolverTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Razor/ExtractToCodeBehindCodeActionResolverTest.cs index 5b3fce18457..f2df3f19a90 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Razor/ExtractToCodeBehindCodeActionResolverTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Razor/ExtractToCodeBehindCodeActionResolverTest.cs @@ -15,7 +15,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Roslyn.Test.Utilities; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/CompletionListCacheTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/CompletionListCacheTest.cs index e8e4168611b..800f678c403 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/CompletionListCacheTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/CompletionListCacheTest.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using Microsoft.AspNetCore.Razor.Test.Common; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/CompletionListMergerTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/CompletionListMergerTest.cs index ee70ac5c7b0..ae2b9078ef2 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/CompletionListMergerTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/CompletionListMergerTest.cs @@ -5,7 +5,6 @@ using System.Linq; using Microsoft.AspNetCore.Razor.Test.Common; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/CompletionListOptimizerTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/CompletionListOptimizerTest.cs index 9d37f1f9655..d5931b10210 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/CompletionListOptimizerTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/CompletionListOptimizerTest.cs @@ -4,7 +4,6 @@ #nullable disable using Microsoft.AspNetCore.Razor.Test.Common; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/CompletionListProviderTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/CompletionListProviderTest.cs index e3f63cfb270..1ff8ecb0a0d 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/CompletionListProviderTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/CompletionListProviderTest.cs @@ -12,7 +12,6 @@ using Microsoft.AspNetCore.Razor.Test.Common.LanguageServer; using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.ProjectSystem; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/DefaultLSPTagHelperTooltipFactoryTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/DefaultLSPTagHelperTooltipFactoryTest.cs index d1d4854cdae..0304ad0d85a 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/DefaultLSPTagHelperTooltipFactoryTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/DefaultLSPTagHelperTooltipFactoryTest.cs @@ -8,7 +8,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.Test.Common.LanguageServer; using Microsoft.CodeAnalysis.Razor.Tooltip; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/DelegatedCompletionItemResolverTest.NetFx.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/DelegatedCompletionItemResolverTest.NetFx.cs index a1f9ba82ff2..357ab409326 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/DelegatedCompletionItemResolverTest.NetFx.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/DelegatedCompletionItemResolverTest.NetFx.cs @@ -17,7 +17,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Threading; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/DelegatedCompletionListProviderTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/DelegatedCompletionListProviderTest.cs index d51767f48ad..44b17f844f9 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/DelegatedCompletionListProviderTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/DelegatedCompletionListProviderTest.cs @@ -15,7 +15,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/DesignTimeHelperResponseRewriterTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/DesignTimeHelperResponseRewriterTest.cs index 9a1ff7556f7..2a59f285163 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/DesignTimeHelperResponseRewriterTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/DesignTimeHelperResponseRewriterTest.cs @@ -5,7 +5,6 @@ using System.Linq; using System.Threading.Tasks; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/HtmlCommitCharacterResponseRewriterTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/HtmlCommitCharacterResponseRewriterTest.cs index 098d1a3f090..b7767a05c38 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/HtmlCommitCharacterResponseRewriterTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/HtmlCommitCharacterResponseRewriterTest.cs @@ -7,7 +7,6 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis.Testing; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/ResponseRewriterTestBase.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/ResponseRewriterTestBase.cs index 66225461c0c..040a3081db2 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/ResponseRewriterTestBase.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/ResponseRewriterTestBase.cs @@ -6,7 +6,6 @@ using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.Test.Common.LanguageServer; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit.Abstractions; namespace Microsoft.AspNetCore.Razor.LanguageServer.Completion.Delegation; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/SnippetResponseRewriterTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/SnippetResponseRewriterTest.cs index 78f23228bcc..82c45e335e9 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/SnippetResponseRewriterTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/SnippetResponseRewriterTest.cs @@ -6,7 +6,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.LanguageServer.Completion.Delegation; using Microsoft.CodeAnalysis.Testing; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/TestDelegatedCompletionListProvider.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/TestDelegatedCompletionListProvider.cs index bb8dee4338e..3bdfc83db66 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/TestDelegatedCompletionListProvider.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/TestDelegatedCompletionListProvider.cs @@ -12,7 +12,6 @@ using Microsoft.AspNetCore.Razor.Test.Common.Workspaces; using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Completion.Delegation; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/TextEditResponseRewriterTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/TextEditResponseRewriterTest.cs index 2696cfe185b..e636426102a 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/TextEditResponseRewriterTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/TextEditResponseRewriterTest.cs @@ -4,7 +4,6 @@ #nullable disable using System.Threading.Tasks; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/DirectiveVerifier.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/DirectiveVerifier.cs index 586a8d25dd7..3047a241ece 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/DirectiveVerifier.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/DirectiveVerifier.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.Linq; using Microsoft.CodeAnalysis.Razor.Completion; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; namespace Microsoft.AspNetCore.Razor.LanguageServer.Completion; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/RazorCompletionEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/RazorCompletionEndpointTest.cs index f145c1ca53e..e7190256115 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/RazorCompletionEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/RazorCompletionEndpointTest.cs @@ -7,7 +7,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.Language; using Microsoft.AspNetCore.Razor.Test.Common.LanguageServer; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/RazorCompletionItemResolverTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/RazorCompletionItemResolverTest.cs index 7d1ff4b8bed..e6bf7abfac2 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/RazorCompletionItemResolverTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/RazorCompletionItemResolverTest.cs @@ -11,7 +11,6 @@ using Microsoft.AspNetCore.Razor.Test.Common.LanguageServer; using Microsoft.CodeAnalysis.Razor.Completion; using Microsoft.CodeAnalysis.Razor.Tooltip; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/RazorCompletionListProviderTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/RazorCompletionListProviderTest.cs index cd809b718d3..cafbed46a4c 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/RazorCompletionListProviderTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/RazorCompletionListProviderTest.cs @@ -15,7 +15,6 @@ using Microsoft.CodeAnalysis.Razor.Completion; using Microsoft.CodeAnalysis.Razor.Tooltip; using Microsoft.CodeAnalysis.Testing; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; using static Microsoft.AspNetCore.Razor.Language.CommonMetadata; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/RazorCompletionResolveEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/RazorCompletionResolveEndpointTest.cs index 8586d5b9635..56a4bff1f9f 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/RazorCompletionResolveEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/RazorCompletionResolveEndpointTest.cs @@ -10,7 +10,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.LanguageServer.Test; using Microsoft.AspNetCore.Razor.Test.Common.LanguageServer; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/TestDocumentMappingService.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/TestDocumentMappingService.cs index 2e384656518..7e51b223495 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/TestDocumentMappingService.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/TestDocumentMappingService.cs @@ -8,7 +8,6 @@ using Microsoft.CodeAnalysis.Razor.DocumentMapping; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Completion; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Debugging/RazorBreakpointSpanEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Debugging/RazorBreakpointSpanEndpointTest.cs index d2c5921b3c9..582cad2b553 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Debugging/RazorBreakpointSpanEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Debugging/RazorBreakpointSpanEndpointTest.cs @@ -7,7 +7,6 @@ using Microsoft.AspNetCore.Razor.Test.Common.LanguageServer; using Microsoft.CodeAnalysis.Razor.DocumentMapping; using Microsoft.CodeAnalysis.Razor.Protocol.Debugging; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Debugging/RazorProximityExpressionsEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Debugging/RazorProximityExpressionsEndpointTest.cs index 3cd6acb4f6b..688a5c97b97 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Debugging/RazorProximityExpressionsEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Debugging/RazorProximityExpressionsEndpointTest.cs @@ -7,7 +7,6 @@ using Microsoft.AspNetCore.Razor.Test.Common.LanguageServer; using Microsoft.CodeAnalysis.Razor.DocumentMapping; using Microsoft.CodeAnalysis.Razor.Protocol.Debugging; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Debugging/ValidateBreakpointRangeEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Debugging/ValidateBreakpointRangeEndpointTest.cs index 99e05e6190a..de15137c695 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Debugging/ValidateBreakpointRangeEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Debugging/ValidateBreakpointRangeEndpointTest.cs @@ -10,11 +10,9 @@ using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; using Microsoft.CommonLanguageServerProtocol.Framework; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.LanguageServer.Debugging; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DefaultRazorConfigurationServiceTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DefaultRazorConfigurationServiceTest.cs index 29048394810..e06c649a43a 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DefaultRazorConfigurationServiceTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DefaultRazorConfigurationServiceTest.cs @@ -8,7 +8,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.LanguageServer.Hosting; using Microsoft.AspNetCore.Razor.Test.Common.LanguageServer; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DefaultWorkspaceDirectoryPathResolverTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DefaultWorkspaceDirectoryPathResolverTest.cs index 704de2c824a..6616a712ba5 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DefaultWorkspaceDirectoryPathResolverTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DefaultWorkspaceDirectoryPathResolverTest.cs @@ -5,7 +5,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.Test.Common; using Microsoft.CommonLanguageServerProtocol.Framework; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Definition/DefinitionEndpointDelegationTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Definition/DefinitionEndpointDelegationTest.cs index 7526d0b052b..bc913d0cbca 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Definition/DefinitionEndpointDelegationTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Definition/DefinitionEndpointDelegationTest.cs @@ -10,7 +10,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; using DefinitionResult = Microsoft.VisualStudio.LanguageServer.Protocol.SumType< diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Definition/DefinitionEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Definition/DefinitionEndpointTest.cs index ebfb6b65708..8094f7ca450 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Definition/DefinitionEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Definition/DefinitionEndpointTest.cs @@ -12,7 +12,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/CSharpDiagnosticsEndToEndTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/CSharpDiagnosticsEndToEndTest.cs index 8122d21ac0e..b26579379b8 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/CSharpDiagnosticsEndToEndTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/CSharpDiagnosticsEndToEndTest.cs @@ -11,7 +11,6 @@ using Microsoft.AspNetCore.Razor.LanguageServer.EndpointContracts; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/DocumentPullDiagnosticsEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/DocumentPullDiagnosticsEndpointTest.cs index b5d4b12c60a..fd17aef5438 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/DocumentPullDiagnosticsEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/DocumentPullDiagnosticsEndpointTest.cs @@ -5,7 +5,6 @@ using Microsoft.AspNetCore.Razor.LanguageServer.Hosting; using Microsoft.AspNetCore.Razor.Test.Common.LanguageServer; using Microsoft.AspNetCore.Razor.Test.Common.Workspaces; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/RazorDiagnosticConverterTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/RazorDiagnosticConverterTest.cs index 0b40950b057..befff92f65c 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/RazorDiagnosticConverterTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/RazorDiagnosticConverterTest.cs @@ -7,7 +7,6 @@ using Microsoft.AspNetCore.Razor.Language; using Microsoft.AspNetCore.Razor.Test.Common.LanguageServer; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/RazorDiagnosticsPublisherTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/RazorDiagnosticsPublisherTest.cs index 543e90e278b..9011fd45176 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/RazorDiagnosticsPublisherTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/RazorDiagnosticsPublisherTest.cs @@ -18,7 +18,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentHighlighting/DocumentHighlightEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentHighlighting/DocumentHighlightEndpointTest.cs index 59b5b074499..20fd7b1ad3b 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentHighlighting/DocumentHighlightEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentHighlighting/DocumentHighlightEndpointTest.cs @@ -16,7 +16,6 @@ using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentPresentation/TextDocumentTextPresentationEndpointTests.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentPresentation/TextDocumentTextPresentationEndpointTests.cs index a2072787e14..62f80643170 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentPresentation/TextDocumentTextPresentationEndpointTests.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentPresentation/TextDocumentTextPresentationEndpointTests.cs @@ -11,7 +11,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.DocumentPresentation; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentPresentation/TextDocumentUriPresentationEndpointTests.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentPresentation/TextDocumentUriPresentationEndpointTests.cs index 30df2ebf408..91b1c7efba8 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentPresentation/TextDocumentUriPresentationEndpointTests.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentPresentation/TextDocumentUriPresentationEndpointTests.cs @@ -14,7 +14,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.DocumentPresentation; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentSymbols/DocumentSymbolEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentSymbols/DocumentSymbolEndpointTest.cs index f8cbf5683e3..de6185c4fc3 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentSymbols/DocumentSymbolEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentSymbols/DocumentSymbolEndpointTest.cs @@ -10,7 +10,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentSynchronization/DocumentDidChangeEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentSynchronization/DocumentDidChangeEndpointTest.cs index b80ba2f8b69..7702de65367 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentSynchronization/DocumentDidChangeEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentSynchronization/DocumentDidChangeEndpointTest.cs @@ -8,7 +8,6 @@ using Microsoft.AspNetCore.Razor.Test.Common; using Microsoft.AspNetCore.Razor.Test.Common.LanguageServer; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentSynchronization/DocumentDidCloseEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentSynchronization/DocumentDidCloseEndpointTest.cs index 8725a99107b..3d1978d5ae8 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentSynchronization/DocumentDidCloseEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentSynchronization/DocumentDidCloseEndpointTest.cs @@ -7,7 +7,6 @@ using Microsoft.AspNetCore.Razor.LanguageServer.ProjectSystem; using Microsoft.AspNetCore.Razor.Test.Common; using Microsoft.AspNetCore.Razor.Test.Common.LanguageServer; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentSynchronization/DocumentDidOpenEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentSynchronization/DocumentDidOpenEndpointTest.cs index 4867629a6f9..5b6d7612352 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentSynchronization/DocumentDidOpenEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentSynchronization/DocumentDidOpenEndpointTest.cs @@ -8,7 +8,6 @@ using Microsoft.AspNetCore.Razor.Test.Common; using Microsoft.AspNetCore.Razor.Test.Common.LanguageServer; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/FindReferences/FindAllReferencesEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/FindReferences/FindAllReferencesEndpointTest.cs index ff0cc641c58..45490846c14 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/FindReferences/FindAllReferencesEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/FindReferences/FindAllReferencesEndpointTest.cs @@ -8,7 +8,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Folding/FoldingEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Folding/FoldingEndpointTest.cs index 4bafb189d06..4ec5e65c334 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Folding/FoldingEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Folding/FoldingEndpointTest.cs @@ -10,7 +10,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/DocumentOnTypeFormattingEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/DocumentOnTypeFormattingEndpointTest.cs index 1fdb5d79ae8..3e832bda50b 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/DocumentOnTypeFormattingEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/DocumentOnTypeFormattingEndpointTest.cs @@ -9,7 +9,6 @@ using Microsoft.CodeAnalysis.Razor.DocumentMapping; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/DocumentRangeFormattingEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/DocumentRangeFormattingEndpointTest.cs index 964ed2d0ef8..1d1c63cac14 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/DocumentRangeFormattingEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/DocumentRangeFormattingEndpointTest.cs @@ -4,7 +4,6 @@ using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.Language; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingContentValidationPassTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingContentValidationPassTest.cs index a463f8fbea6..20f074012bd 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingContentValidationPassTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingContentValidationPassTest.cs @@ -11,7 +11,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingDiagnosticValidationPassTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingDiagnosticValidationPassTest.cs index 7a36ce7ae5d..c81eb79af71 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingDiagnosticValidationPassTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingDiagnosticValidationPassTest.cs @@ -10,7 +10,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingLanguageServerClient.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingLanguageServerClient.cs index daf60dbe6fd..a86f857a799 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingLanguageServerClient.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingLanguageServerClient.cs @@ -18,7 +18,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.Formatting; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Text; using Microsoft.VisualStudio.Utilities; using Microsoft.WebTools.Languages.Shared.ContentTypes; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingLanguageServerTestBase.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingLanguageServerTestBase.cs index 95b89f2a2db..7873ed1c405 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingLanguageServerTestBase.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingLanguageServerTestBase.cs @@ -12,9 +12,7 @@ using Microsoft.AspNetCore.Razor.Threading; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit.Abstractions; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingTestBase.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingTestBase.cs index 8e3bef3a2e0..d4a09040768 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingTestBase.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingTestBase.cs @@ -22,7 +22,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Roslyn.Test.Utilities; using Xunit; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/RazorFormattingServiceTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/RazorFormattingServiceTest.cs index a61de35e8b0..b9c09d12568 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/RazorFormattingServiceTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/RazorFormattingServiceTest.cs @@ -6,7 +6,6 @@ using System.Linq; using Microsoft.AspNetCore.Razor.Test.Common; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/GeneratedDocumentPublisherTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/GeneratedDocumentPublisherTest.cs index e2fa1ae18e1..dc56469a0af 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/GeneratedDocumentPublisherTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/GeneratedDocumentPublisherTest.cs @@ -9,7 +9,6 @@ using Microsoft.AspNetCore.Razor.Test.Common.Workspaces; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Hover/HoverServiceTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Hover/HoverServiceTest.cs index 1c533c81c72..3c358abc519 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Hover/HoverServiceTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Hover/HoverServiceTest.cs @@ -22,7 +22,6 @@ using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Text.Adornments; using Moq; using Xunit; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Implementation/ImplementationEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Implementation/ImplementationEndpointTest.cs index 0dedf24fcda..31687eaf8ff 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Implementation/ImplementationEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Implementation/ImplementationEndpointTest.cs @@ -10,7 +10,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/InlayHints/InlayHintEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/InlayHints/InlayHintEndpointTest.cs index b58e504a512..a1328dca382 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/InlayHints/InlayHintEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/InlayHints/InlayHintEndpointTest.cs @@ -10,7 +10,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Roslyn.Test.Utilities; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/LinkedEditingRange/LinkedEditingRangeEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/LinkedEditingRange/LinkedEditingRangeEndpointTest.cs index f4aad3eeca9..d7b5d2c4848 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/LinkedEditingRange/LinkedEditingRangeEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/LinkedEditingRange/LinkedEditingRangeEndpointTest.cs @@ -8,7 +8,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.LanguageServer.Completion; using Microsoft.CodeAnalysis.Razor.LinkedEditingRange; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/MapCode/MapCodeTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/MapCode/MapCodeTest.cs index ba8a4a7fce8..92c854be428 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/MapCode/MapCodeTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/MapCode/MapCodeTest.cs @@ -15,7 +15,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Roslyn.Test.Utilities; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Mapping/RazorLanguageQueryEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Mapping/RazorLanguageQueryEndpointTest.cs index f788b4c06fd..ae1be6f6e11 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Mapping/RazorLanguageQueryEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Mapping/RazorLanguageQueryEndpointTest.cs @@ -11,7 +11,6 @@ using Microsoft.AspNetCore.Razor.Test.Common.LanguageServer; using Microsoft.CodeAnalysis.Razor.DocumentMapping; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Mapping/RazorMapToDocumentRangesEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Mapping/RazorMapToDocumentRangesEndpointTest.cs index ed5683d7d7e..7a82047fd71 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Mapping/RazorMapToDocumentRangesEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Mapping/RazorMapToDocumentRangesEndpointTest.cs @@ -10,7 +10,6 @@ using Microsoft.CodeAnalysis.Razor.DocumentMapping; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.DocumentMapping; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/ProjectContexts/ProjectContextsEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/ProjectContexts/ProjectContextsEndpointTest.cs index 8a17f7af7d4..e46ad15e7a0 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/ProjectContexts/ProjectContextsEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/ProjectContexts/ProjectContextsEndpointTest.cs @@ -6,7 +6,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.LanguageServer.ProjectContexts; using Microsoft.CodeAnalysis.Razor.ProjectSystem; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/RangeExtensionsTests.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/RangeExtensionsTests.cs index 6e11b326a24..54ffd326cb3 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/RangeExtensionsTests.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/RangeExtensionsTests.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using System; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; namespace Microsoft.AspNetCore.Razor.LanguageServer.Test; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/RazorConfigurationEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/RazorConfigurationEndpointTest.cs index c044d347085..5a597d5c2c8 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/RazorConfigurationEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/RazorConfigurationEndpointTest.cs @@ -5,7 +5,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.LanguageServer.Hosting; using Microsoft.AspNetCore.Razor.Test.Common.LanguageServer; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/RazorFileChangeDetectorManagerTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/RazorFileChangeDetectorManagerTest.cs index bcb359d3616..b95567533bb 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/RazorFileChangeDetectorManagerTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/RazorFileChangeDetectorManagerTest.cs @@ -6,7 +6,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.Test.Common; using Microsoft.CommonLanguageServerProtocol.Framework; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/RazorLanguageServerTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/RazorLanguageServerTest.cs index 3fc2585b22d..b62b7e0fde4 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/RazorLanguageServerTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/RazorLanguageServerTest.cs @@ -16,7 +16,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CommonLanguageServerProtocol.Framework; using Microsoft.Extensions.DependencyInjection; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Nerdbank.Streams; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Refactoring/RenameEndpointDelegationTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Refactoring/RenameEndpointDelegationTest.cs index f11cb0b851f..68023ebf9ef 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Refactoring/RenameEndpointDelegationTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Refactoring/RenameEndpointDelegationTest.cs @@ -11,7 +11,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Refactoring/RenameEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Refactoring/RenameEndpointTest.cs index 4ff2ec8d1f8..f185797058d 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Refactoring/RenameEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Refactoring/RenameEndpointTest.cs @@ -24,7 +24,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Semantic/RazorSemanticTokensRefreshEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Semantic/RazorSemanticTokensRefreshEndpointTest.cs index ef79b93360f..d95f5bc3f4a 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Semantic/RazorSemanticTokensRefreshEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Semantic/RazorSemanticTokensRefreshEndpointTest.cs @@ -13,7 +13,6 @@ using Microsoft.CodeAnalysis.Razor; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Workspaces.Protocol.SemanticTokens; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Semantic/SemanticTokensTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Semantic/SemanticTokensTest.cs index 4c460d0cffd..d3aaa85f5d7 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Semantic/SemanticTokensTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Semantic/SemanticTokensTest.cs @@ -28,7 +28,6 @@ using Microsoft.CodeAnalysis.Razor.Workspaces.Protocol.SemanticTokens; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Serialization/PlatformAgnosticClientCapabilitiesJsonConverterTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Serialization/PlatformAgnosticClientCapabilitiesJsonConverterTest.cs index 8d2f84072f0..84d5b73fd84 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Serialization/PlatformAgnosticClientCapabilitiesJsonConverterTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Serialization/PlatformAgnosticClientCapabilitiesJsonConverterTest.cs @@ -5,7 +5,6 @@ using System.Linq; using System.Text.Json; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; namespace Microsoft.AspNetCore.Razor.LanguageServer.Serialization; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/SignatureHelp/SignatureHelpEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/SignatureHelp/SignatureHelpEndpointTest.cs index b794fc1ece3..64e18140443 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/SignatureHelp/SignatureHelpEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/SignatureHelp/SignatureHelpEndpointTest.cs @@ -9,7 +9,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/SingleServerDelegatingEndpointTestBase.TestLanguageServer.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/SingleServerDelegatingEndpointTestBase.TestLanguageServer.cs index ff1b414a209..1f260dac179 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/SingleServerDelegatingEndpointTestBase.TestLanguageServer.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/SingleServerDelegatingEndpointTestBase.TestLanguageServer.cs @@ -13,7 +13,6 @@ using Microsoft.CodeAnalysis.Razor.Protocol.CodeActions; using Microsoft.CodeAnalysis.Razor.Protocol.Diagnostics; using Microsoft.CodeAnalysis.Razor.Protocol.Folding; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Xunit; using DefinitionResult = Microsoft.VisualStudio.LanguageServer.Protocol.SumType< Microsoft.VisualStudio.LanguageServer.Protocol.VSInternalLocation, diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/SingleServerDelegatingEndpointTestBase.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/SingleServerDelegatingEndpointTestBase.cs index 6d5d6cca9a2..8f28216b150 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/SingleServerDelegatingEndpointTestBase.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/SingleServerDelegatingEndpointTestBase.cs @@ -13,7 +13,6 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/SpellCheck/DocumentSpellCheckEndpointTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/SpellCheck/DocumentSpellCheckEndpointTest.cs index 72f9c894e4f..ceba29ef96e 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/SpellCheck/DocumentSpellCheckEndpointTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/SpellCheck/DocumentSpellCheckEndpointTest.cs @@ -9,7 +9,6 @@ using Microsoft.AspNetCore.Razor.LanguageServer.EndpointContracts; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Roslyn.Test.Utilities; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/TestClient.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/TestClient.cs index c99ebf5cd55..436855cc6c8 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/TestClient.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/TestClient.cs @@ -7,7 +7,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.LanguageServer.Hosting; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/WorkspaceSemanticTokensRefreshNotifierTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/WorkspaceSemanticTokensRefreshNotifierTest.cs index 3cf9d0fbc02..f604e190c91 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/WorkspaceSemanticTokensRefreshNotifierTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/WorkspaceSemanticTokensRefreshNotifierTest.cs @@ -7,7 +7,6 @@ using Microsoft.AspNetCore.Razor.LanguageServer.Test; using Microsoft.AspNetCore.Razor.Test.Common; using Microsoft.AspNetCore.Razor.Test.Common.LanguageServer; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/WrapWithTag/WrapWithTagEndpointTests.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/WrapWithTag/WrapWithTagEndpointTests.cs index 4853d918edd..d16bc53a40c 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/WrapWithTag/WrapWithTagEndpointTests.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/WrapWithTag/WrapWithTagEndpointTests.cs @@ -12,7 +12,6 @@ using Microsoft.CodeAnalysis.Razor.DocumentMapping; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Moq; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/CSharpTestLspServer.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/CSharpTestLspServer.cs index f264cad399e..f3559f2fd8d 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/CSharpTestLspServer.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/CSharpTestLspServer.cs @@ -12,10 +12,8 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.ExternalAccess.Razor; using Microsoft.VisualStudio.Composition; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Nerdbank.Streams; using StreamJsonRpc; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace Microsoft.AspNetCore.Razor.Test.Common.LanguageServer; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/TestDocumentContextFactory.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/TestDocumentContextFactory.cs index 591df7ed021..1d7fd6bd3f8 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/TestDocumentContextFactory.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/TestDocumentContextFactory.cs @@ -5,7 +5,6 @@ using System.Diagnostics.CodeAnalysis; using Microsoft.AspNetCore.Razor.Language; using Microsoft.CodeAnalysis.Razor.ProjectSystem; -using Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.Test.Common.LanguageServer; From 9792de5e57c38d917a2b2e3b0d9119e3dd6176dc Mon Sep 17 00:00:00 2001 From: David Wengier Date: Tue, 30 Jul 2024 13:34:41 +1000 Subject: [PATCH 07/20] More Range -> LspRange --- .../Delegation/TextEditResponseRewriter.cs | 2 +- .../ValidateBreakpointRangeEndpoint.cs | 8 ++--- .../Formatting/IRazorFormattingService.cs | 2 +- .../Formatting/RazorFormattingPass.cs | 4 +-- .../InlayHints/IInlayHintService.cs | 2 +- .../InlayHints/InlayHintService.cs | 2 +- .../WrapWithTag/WrapWithTagParams.cs | 2 +- .../WrapWithTag/WrapWithTagResponse.cs | 2 +- .../Extensions/LspExtensions_LinePosition.cs | 2 +- .../LspExtensions_LinePositionSpan.cs | 2 +- .../Extensions/LspExtensions_Position.cs | 2 +- .../Extensions/LspExtensions_Range.cs | 32 ++++++++--------- .../Extensions/LspExtensions_SourceText.cs | 10 +++--- .../Extensions/LspExtensions_SyntaxNode.cs | 4 +-- .../Extensions/LspFactory.cs | 36 +++++++++---------- .../CodeActions/VSCodeActionParams.cs | 2 +- .../Debugging/RazorBreakpointSpanResponse.cs | 2 +- .../Protocol/DelegatedTypes.cs | 4 +-- .../RazorMapToDocumentRangesResponse.cs | 2 +- .../IPresentationParams.cs | 2 +- .../SemanticTokensRangesParams.cs | 2 +- .../Debugging/LSPBreakpointSpanProvider.cs | 2 +- .../TextEditResponseRewriterTest.cs | 2 +- 23 files changed, 65 insertions(+), 65 deletions(-) diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/TextEditResponseRewriter.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/TextEditResponseRewriter.cs index ac6bb4aaebd..d14fe2306f4 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/TextEditResponseRewriter.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/Delegation/TextEditResponseRewriter.cs @@ -82,7 +82,7 @@ private static VSInternalCompletionList TranslateTextEdits( return completionList; } - private static Range TranslateRange(Position hostDocumentPosition, Position projectedPosition, Range textEditRange) + private static LspRange TranslateRange(Position hostDocumentPosition, Position projectedPosition, LspRange textEditRange) { var offset = projectedPosition.Character - hostDocumentPosition.Character; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Debugging/ValidateBreakpointRangeEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Debugging/ValidateBreakpointRangeEndpoint.cs index 7e4cb4a209b..ecbecd8f854 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Debugging/ValidateBreakpointRangeEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Debugging/ValidateBreakpointRangeEndpoint.cs @@ -20,7 +20,7 @@ internal class ValidateBreakpointRangeEndpoint( LanguageServerFeatureOptions languageServerFeatureOptions, IClientConnection clientConnection, ILoggerFactory loggerFactory) - : AbstractRazorDelegatingEndpoint( + : AbstractRazorDelegatingEndpoint( languageServerFeatureOptions, documentMappingService, clientConnection, @@ -37,10 +37,10 @@ public void ApplyCapabilities(VSInternalServerCapabilities serverCapabilities, V serverCapabilities.EnableValidateBreakpointRange(); } - protected override Task TryHandleAsync(ValidateBreakpointRangeParams request, RazorRequestContext requestContext, DocumentPositionInfo positionInfo, CancellationToken cancellationToken) + protected override Task TryHandleAsync(ValidateBreakpointRangeParams request, RazorRequestContext requestContext, DocumentPositionInfo positionInfo, CancellationToken cancellationToken) { // no such thing as Razor breakpoints (yet?!) - return SpecializedTasks.Null(); + return SpecializedTasks.Null(); } protected async override Task CreateDelegatedParamsAsync(ValidateBreakpointRangeParams request, RazorRequestContext requestContext, DocumentPositionInfo positionInfo, CancellationToken cancellationToken) @@ -71,7 +71,7 @@ public void ApplyCapabilities(VSInternalServerCapabilities serverCapabilities, V positionInfo.LanguageKind); } - protected async override Task HandleDelegatedResponseAsync(Range? delegatedResponse, ValidateBreakpointRangeParams originalRequest, RazorRequestContext requestContext, DocumentPositionInfo positionInfo, CancellationToken cancellationToken) + protected async override Task HandleDelegatedResponseAsync(LspRange? delegatedResponse, ValidateBreakpointRangeParams originalRequest, RazorRequestContext requestContext, DocumentPositionInfo positionInfo, CancellationToken cancellationToken) { if (delegatedResponse is null) { diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/IRazorFormattingService.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/IRazorFormattingService.cs index 1b083959198..5eb363ca31c 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/IRazorFormattingService.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/IRazorFormattingService.cs @@ -12,7 +12,7 @@ internal interface IRazorFormattingService { Task FormatAsync( VersionedDocumentContext documentContext, - Range? range, + LspRange? range, FormattingOptions options, CancellationToken cancellationToken); diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/RazorFormattingPass.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/RazorFormattingPass.cs index 4a2cf9a7e6b..4c2584529cc 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/RazorFormattingPass.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/RazorFormattingPass.cs @@ -421,7 +421,7 @@ closeBraceRange is not null && return didFormat; - static bool RangeHasBeenModified(IList edits, Range range) + static bool RangeHasBeenModified(IList edits, LspRange range) { // Because we don't always know what kind of Razor object we're operating on we have to do this to avoid duplicate edits. // The other way to accomplish this would be to apply the edits after every node and function, but that's not in scope for my current work. @@ -430,7 +430,7 @@ static bool RangeHasBeenModified(IList edits, Range range) return hasBeenModified; } - static int GetAdditionalIndentationLevel(FormattingContext context, Range range, SyntaxNode openBraceNode, SyntaxNode codeNode) + static int GetAdditionalIndentationLevel(FormattingContext context, LspRange range, SyntaxNode openBraceNode, SyntaxNode codeNode) { if (!context.TryGetIndentationLevel(codeNode.Position, out var desiredIndentationLevel)) { diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/IInlayHintService.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/IInlayHintService.cs index d3f0b2d10aa..1906699be9c 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/IInlayHintService.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/IInlayHintService.cs @@ -10,7 +10,7 @@ namespace Microsoft.AspNetCore.Razor.LanguageServer.InlayHints; internal interface IInlayHintService { - Task GetInlayHintsAsync(IClientConnection clientConnection, VersionedDocumentContext documentContext, Range range, CancellationToken cancellationToken); + Task GetInlayHintsAsync(IClientConnection clientConnection, VersionedDocumentContext documentContext, LspRange range, CancellationToken cancellationToken); Task ResolveInlayHintAsync(IClientConnection clientConnection, InlayHint inlayHint, CancellationToken cancellationToken); } diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/InlayHintService.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/InlayHintService.cs index 4459e7a94f8..c39cc1713ef 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/InlayHintService.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlayHints/InlayHintService.cs @@ -21,7 +21,7 @@ internal sealed class InlayHintService(IRazorDocumentMappingService documentMapp { private readonly IRazorDocumentMappingService _documentMappingService = documentMappingService; - public async Task GetInlayHintsAsync(IClientConnection clientConnection, VersionedDocumentContext documentContext, Range range, CancellationToken cancellationToken) + public async Task GetInlayHintsAsync(IClientConnection clientConnection, VersionedDocumentContext documentContext, LspRange range, CancellationToken cancellationToken) { var codeDocument = await documentContext.GetCodeDocumentAsync(cancellationToken).ConfigureAwait(false); var csharpDocument = codeDocument.GetCSharpDocument(); diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/WrapWithTag/WrapWithTagParams.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/WrapWithTag/WrapWithTagParams.cs index 68a74a73b74..d2d1900bb63 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/WrapWithTag/WrapWithTagParams.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/WrapWithTag/WrapWithTagParams.cs @@ -20,7 +20,7 @@ internal class WrapWithTagParams /// Gets or sets the selection range to be wrapped. /// [JsonPropertyName("_vs_range")] - public Range? Range { get; set; } + public LspRange? Range { get; set; } /// /// Gets or sets the wrapping tag name. diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/WrapWithTag/WrapWithTagResponse.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/WrapWithTag/WrapWithTagResponse.cs index a4130b83329..5d9eb3d1f6c 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/WrapWithTag/WrapWithTagResponse.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/WrapWithTag/WrapWithTagResponse.cs @@ -14,7 +14,7 @@ internal class WrapWithTagResponse /// Gets or sets the range of the wrapping tag. /// [JsonPropertyName("_vs_tagRange")] - public Range? TagRange { get; set; } + public LspRange? TagRange { get; set; } /// /// Gets or sets the text edits. diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePosition.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePosition.cs index 0eee990af2f..38050f87ca5 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePosition.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePosition.cs @@ -10,6 +10,6 @@ internal static partial class LspExtensions public static Position ToPosition(this LinePosition linePosition) => LspFactory.CreatePosition(linePosition.Line, linePosition.Character); - public static Range ToZeroWidthRange(this LinePosition position) + public static LspRange ToZeroWidthRange(this LinePosition position) => LspFactory.CreateZeroWidthRange(position); } diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePositionSpan.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePositionSpan.cs index 84fbf51ceb8..66422294e98 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePositionSpan.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePositionSpan.cs @@ -7,6 +7,6 @@ namespace Microsoft.VisualStudio.LanguageServer.Protocol; internal static partial class LspExtensions { - public static Range ToRange(this LinePositionSpan linePositionSpan) + public static LspRange ToRange(this LinePositionSpan linePositionSpan) => LspFactory.CreateRange(linePositionSpan); } diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Position.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Position.cs index e134672b0a9..5156ecc9c3e 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Position.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Position.cs @@ -13,7 +13,7 @@ public static void Deconstruct(this Position position, out int line, out int cha public static LinePosition ToLinePosition(this Position position) => new(position.Line, position.Character); - public static Range ToZeroWidthRange(this Position position) + public static LspRange ToZeroWidthRange(this Position position) => LspFactory.CreateZeroWidthRange(position); public static int CompareTo(this Position position, Position other) diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Range.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Range.cs index 7e2d82e730c..0a5a07f8583 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Range.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Range.cs @@ -7,16 +7,16 @@ namespace Microsoft.VisualStudio.LanguageServer.Protocol; internal static partial class LspExtensions { - public static void Deconstruct(this Range range, out Position start, out Position end) + public static void Deconstruct(this LspRange range, out Position start, out Position end) => (start, end) = (range.Start, range.End); - public static void Deconstruct(this Range range, out int startLine, out int startCharacter, out int endLine, out int endCharacter) + public static void Deconstruct(this LspRange range, out int startLine, out int startCharacter, out int endLine, out int endCharacter) => (startLine, startCharacter, endLine, endCharacter) = (range.Start.Line, range.Start.Character, range.End.Line, range.End.Character); - public static LinePositionSpan ToLinePositionSpan(this Range range) + public static LinePositionSpan ToLinePositionSpan(this LspRange range) => new(range.Start.ToLinePosition(), range.End.ToLinePosition()); - public static bool IntersectsOrTouches(this Range range, Range other) + public static bool IntersectsOrTouches(this LspRange range, LspRange other) { if (range.IsBefore(other)) { @@ -31,18 +31,18 @@ public static bool IntersectsOrTouches(this Range range, Range other) return true; } - private static bool IsBefore(this Range range, Range other) => + private static bool IsBefore(this LspRange range, LspRange other) => range.End.Line < other.Start.Line || (range.End.Line == other.Start.Line && range.End.Character < other.Start.Character); - private static bool IsAfter(this Range range, Range other) => + private static bool IsAfter(this LspRange range, LspRange other) => other.End.Line < range.Start.Line || (other.End.Line == range.Start.Line && other.End.Character < range.Start.Character); - public static bool OverlapsWith(this Range range, Range other) + public static bool OverlapsWith(this LspRange range, LspRange other) { return range.ToLinePositionSpan().OverlapsWith(other.ToLinePositionSpan()); } - public static bool LineOverlapsWith(this Range range, Range other) + public static bool LineOverlapsWith(this LspRange range, LspRange other) { var overlapStart = range.Start.Line; if (range.Start.Line.CompareTo(other.Start.Line) < 0) @@ -59,33 +59,33 @@ public static bool LineOverlapsWith(this Range range, Range other) return overlapStart.CompareTo(overlapEnd) <= 0; } - public static bool Contains(this Range range, Range other) + public static bool Contains(this LspRange range, LspRange other) { return range.Start.CompareTo(other.Start) <= 0 && range.End.CompareTo(other.End) >= 0; } - public static bool SpansMultipleLines(this Range range) + public static bool SpansMultipleLines(this LspRange range) { return range.Start.Line != range.End.Line; } - public static bool IsSingleLine(this Range range) + public static bool IsSingleLine(this LspRange range) { return range.Start.Line == range.End.Line; } - public static bool IsUndefined(this Range range) + public static bool IsUndefined(this LspRange range) { return range == LspFactory.UndefinedRange; } - public static bool IsZeroWidth(this Range range) + public static bool IsZeroWidth(this LspRange range) { return range.Start == range.End; } - public static int CompareTo(this Range range1, Range range2) + public static int CompareTo(this LspRange range1, LspRange range2) { var result = range1.Start.CompareTo(range2.Start); @@ -97,7 +97,7 @@ public static int CompareTo(this Range range1, Range range2) return result; } - public static Range? Overlap(this Range range, Range other) + public static LspRange? Overlap(this LspRange range, LspRange other) { var overlapStart = range.Start; if (range.Start.CompareTo(other.Start) < 0) @@ -120,6 +120,6 @@ public static int CompareTo(this Range range1, Range range2) return null; } - public static string ToDisplayString(this Range range) + public static string ToDisplayString(this LspRange range) => $"{range.Start.ToDisplayString()}-{range.End.ToDisplayString()}"; } diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SourceText.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SourceText.cs index 9122e5b2deb..086c5312dd0 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SourceText.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SourceText.cs @@ -15,16 +15,16 @@ public static int GetPosition(this SourceText text, Position position) public static Position GetPosition(this SourceText text, int position) => text.GetLinePosition(position).ToPosition(); - public static Range GetRange(this SourceText text, TextSpan span) + public static LspRange GetRange(this SourceText text, TextSpan span) => text.GetLinePositionSpan(span).ToRange(); - public static Range GetRange(this SourceText text, SourceSpan span) + public static LspRange GetRange(this SourceText text, SourceSpan span) => text.GetLinePositionSpan(span).ToRange(); - public static Range GetRange(this SourceText text, int start, int end) + public static LspRange GetRange(this SourceText text, int start, int end) => text.GetLinePositionSpan(start, end).ToRange(); - public static Range GetZeroWidthRange(this SourceText text, int position) + public static LspRange GetZeroWidthRange(this SourceText text, int position) => text.GetLinePosition(position).ToZeroWidthRange(); public static bool IsValidPosition(this SourceText text, Position position) @@ -36,7 +36,7 @@ public static bool TryGetAbsoluteIndex(this SourceText text, Position position, public static int GetRequiredAbsoluteIndex(this SourceText text, Position position) => text.GetRequiredAbsoluteIndex(position.Line, position.Character); - public static TextSpan GetTextSpan(this SourceText text, Range range) + public static TextSpan GetTextSpan(this SourceText text, LspRange range) => text.GetTextSpan(range.Start.Line, range.Start.Character, range.End.Line, range.End.Character); public static bool TryGetSourceLocation(this SourceText text, Position position, out SourceLocation location) diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SyntaxNode.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SyntaxNode.cs index ad3dcf3e744..95a6ef118a7 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SyntaxNode.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SyntaxNode.cs @@ -11,14 +11,14 @@ namespace Microsoft.VisualStudio.LanguageServer.Protocol; internal static partial class LspExtensions { - public static Range GetRange(this SyntaxNode node, RazorSourceDocument source) + public static LspRange GetRange(this SyntaxNode node, RazorSourceDocument source) { var linePositionSpan = node.GetLinePositionSpan(source); return LspFactory.CreateRange(linePositionSpan); } - public static Range? GetRangeWithoutWhitespace(this SyntaxNode node, RazorSourceDocument source) + public static LspRange? GetRangeWithoutWhitespace(this SyntaxNode node, RazorSourceDocument source) { var tokens = node.GetTokens(); diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspFactory.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspFactory.cs index 182a0c45a79..e57f55c8e25 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspFactory.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspFactory.cs @@ -10,7 +10,7 @@ internal static class LspFactory { private static readonly Position s_defaultPosition = new(0, 0); - private static readonly Range s_defaultRange = new() + private static readonly LspRange s_defaultRange = new() { Start = s_defaultPosition, End = s_defaultPosition @@ -18,7 +18,7 @@ internal static class LspFactory private static readonly Position s_undefinedPosition = new(-1, -1); - private static readonly Range s_undefinedRange = new() + private static readonly LspRange s_undefinedRange = new() { Start = s_undefinedPosition, End = s_undefinedPosition @@ -47,7 +47,7 @@ public static Position DefaultPosition /// Returns a for starting line 0 and character 0, /// and ending line 0 and character 0. /// - public static Range DefaultRange + public static LspRange DefaultRange { get { @@ -81,7 +81,7 @@ public static Position UndefinedPosition } } - public static Range UndefinedRange + public static LspRange UndefinedRange { get { @@ -113,24 +113,24 @@ public static Position CreatePosition(LinePosition linePosition) public static Position CreatePosition((int line, int character) position) => CreatePosition(position.line, position.character); - public static Range CreateRange(int startLine, int startCharacter, int endLine, int endCharacter) + public static LspRange CreateRange(int startLine, int startCharacter, int endLine, int endCharacter) => startLine == endLine && startCharacter == endCharacter ? CreateZeroWidthRange(startLine, startCharacter) : CreateRange(CreatePosition(startLine, startCharacter), CreatePosition(endLine, endCharacter)); - public static Range CreateRange(Position start, Position end) + public static LspRange CreateRange(Position start, Position end) => new() { Start = start, End = end }; - public static Range CreateRange(LinePosition start, LinePosition end) + public static LspRange CreateRange(LinePosition start, LinePosition end) => CreateRange(start.Line, start.Character, end.Line, end.Character); - public static Range CreateRange((int line, int character) start, (int line, int character) end) + public static LspRange CreateRange((int line, int character) start, (int line, int character) end) => CreateRange(start.line, start.character, end.line, end.character); - public static Range CreateRange(LinePositionSpan span) + public static LspRange CreateRange(LinePositionSpan span) => CreateRange(span.Start, span.End); - public static Range CreateZeroWidthRange(int line, int character) + public static LspRange CreateZeroWidthRange(int line, int character) => (line, character) switch { (0, 0) => DefaultRange, @@ -138,28 +138,28 @@ public static Range CreateZeroWidthRange(int line, int character) _ => CreateZeroWidthRange(CreatePosition(line, character)) }; - public static Range CreateZeroWidthRange(Position position) + public static LspRange CreateZeroWidthRange(Position position) => CreateRange(position, position); - public static Range CreateZeroWidthRange(LinePosition position) + public static LspRange CreateZeroWidthRange(LinePosition position) => CreateRange(position, position); - public static Range CreateZeroWidthRange((int line, int character) position) + public static LspRange CreateZeroWidthRange((int line, int character) position) => CreateRange(position, position); - public static Range CreateSingleLineRange(int line, int character, int length) + public static LspRange CreateSingleLineRange(int line, int character, int length) => CreateRange(line, character, line, character + length); - public static Range CreateSingleLineRange(Position start, int length) + public static LspRange CreateSingleLineRange(Position start, int length) => CreateRange(start, CreatePosition(start.Line, start.Character + length)); - public static Range CreateSingleLineRange(LinePosition start, int length) + public static LspRange CreateSingleLineRange(LinePosition start, int length) => CreateSingleLineRange(start.Line, start.Character, length); - public static Range CreateSingleLineRange((int line, int character) start, int length) + public static LspRange CreateSingleLineRange((int line, int character) start, int length) => CreateRange(CreatePosition(start), CreatePosition(start.line, start.character + length)); - public static TextEdit CreateTextEdit(Range range, string newText) + public static TextEdit CreateTextEdit(LspRange range, string newText) => new() { Range = range, NewText = newText }; public static TextEdit CreateTextEdit(LinePositionSpan span, string newText) diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/CodeActions/VSCodeActionParams.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/CodeActions/VSCodeActionParams.cs index b4b892e4671..6f6c27b574f 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/CodeActions/VSCodeActionParams.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/CodeActions/VSCodeActionParams.cs @@ -21,7 +21,7 @@ internal class VSCodeActionParams [JsonPropertyName("range")] [DataMember(Name = "range")] - public required Range Range { get; set; } + public required LspRange Range { get; set; } [JsonPropertyName("context")] [DataMember(Name = "context")] diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Debugging/RazorBreakpointSpanResponse.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Debugging/RazorBreakpointSpanResponse.cs index cfafecfbd05..880ae17e051 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Debugging/RazorBreakpointSpanResponse.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/Debugging/RazorBreakpointSpanResponse.cs @@ -8,5 +8,5 @@ namespace Microsoft.CodeAnalysis.Razor.Protocol.Debugging; internal class RazorBreakpointSpanResponse { [JsonPropertyName("range")] - public required Range Range { get; init; } + public required LspRange Range { get; init; } } diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DelegatedTypes.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DelegatedTypes.cs index fee959c6efa..d222c5325e1 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DelegatedTypes.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DelegatedTypes.cs @@ -25,7 +25,7 @@ internal record DelegatedPositionParams( internal record DelegatedInlayHintParams( [property: JsonPropertyName("identifier")] TextDocumentIdentifierAndVersion Identifier, - [property: JsonPropertyName("projectedRange")] Range ProjectedRange, + [property: JsonPropertyName("projectedRange")] LspRange ProjectedRange, [property: JsonPropertyName("projectedKind")] RazorLanguageKind ProjectedKind) : IDelegatedParams; internal record DelegatedInlayHintResolveParams( @@ -35,7 +35,7 @@ internal record DelegatedInlayHintResolveParams( internal record DelegatedValidateBreakpointRangeParams( [property: JsonPropertyName("identifier")] TextDocumentIdentifierAndVersion Identifier, - [property: JsonPropertyName("projectedRange")] Range ProjectedRange, + [property: JsonPropertyName("projectedRange")] LspRange ProjectedRange, [property: JsonPropertyName("projectedKind")] RazorLanguageKind ProjectedKind) : IDelegatedParams; internal record DelegatedOnAutoInsertParams( diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentMapping/RazorMapToDocumentRangesResponse.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentMapping/RazorMapToDocumentRangesResponse.cs index 8692fa83020..f82ea528651 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentMapping/RazorMapToDocumentRangesResponse.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentMapping/RazorMapToDocumentRangesResponse.cs @@ -8,7 +8,7 @@ namespace Microsoft.CodeAnalysis.Razor.Protocol.DocumentMapping; internal class RazorMapToDocumentRangesResponse { [JsonPropertyName("ranges")] - public required Range[] Ranges { get; init; } + public required LspRange[] Ranges { get; init; } [JsonPropertyName("hostDocumentVersion")] public int? HostDocumentVersion { get; init; } diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentPresentation/IPresentationParams.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentPresentation/IPresentationParams.cs index 9e3916a3254..603c3a5c336 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentPresentation/IPresentationParams.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentPresentation/IPresentationParams.cs @@ -6,7 +6,7 @@ namespace Microsoft.CodeAnalysis.Razor.Protocol.DocumentPresentation; internal interface IPresentationParams { TextDocumentIdentifier TextDocument { get; set; } - Range Range { get; set; } + LspRange Range { get; set; } } internal interface IRazorPresentationParams : IPresentationParams diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/SemanticTokens/SemanticTokensRangesParams.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/SemanticTokens/SemanticTokensRangesParams.cs index f6f7239723d..10fe9e269f9 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/SemanticTokens/SemanticTokensRangesParams.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/SemanticTokens/SemanticTokensRangesParams.cs @@ -8,5 +8,5 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces.Protocol.SemanticTokens; internal class SemanticTokensRangesParams : SemanticTokensParams { [JsonPropertyName("ranges")] - public required Range[] Ranges { get; set; } + public required LspRange[] Ranges { get; set; } } diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/LSPBreakpointSpanProvider.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/LSPBreakpointSpanProvider.cs index f78eaae24c4..8316dc109be 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/LSPBreakpointSpanProvider.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Debugging/LSPBreakpointSpanProvider.cs @@ -9,5 +9,5 @@ namespace Microsoft.VisualStudio.Razor.LanguageClient.Debugging; internal abstract class LSPBreakpointSpanProvider { - public abstract Task GetBreakpointSpanAsync(LSPDocumentSnapshot documentSnapshot, Position position, CancellationToken cancellationToken); + public abstract Task GetBreakpointSpanAsync(LSPDocumentSnapshot documentSnapshot, Position position, CancellationToken cancellationToken); } diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/TextEditResponseRewriterTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/TextEditResponseRewriterTest.cs index e636426102a..94db2e3d18e 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/TextEditResponseRewriterTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/TextEditResponseRewriterTest.cs @@ -71,7 +71,7 @@ public async Task RewriteAsync_CSharp_AdjustsListRange() Assert.Equal(expectedRange, rewrittenCompletionList.ItemDefaults.EditRange); } - private static VSInternalCompletionList GenerateCompletionList(Range textEditRange) + private static VSInternalCompletionList GenerateCompletionList(LspRange textEditRange) { return new VSInternalCompletionList() { From 8d45e984b99d1456cf81c94508834452f630d186 Mon Sep 17 00:00:00 2001 From: David Wengier Date: Tue, 30 Jul 2024 14:07:43 +1000 Subject: [PATCH 08/20] Introduce extern alias where necessary to reference Roslyn types --- .../Completion/CompletionListOptimizer.cs | 4 +++- .../Completion/RazorCompletionItemResolver.cs | 4 +++- .../Definition/DefinitionEndpoint.cs | 10 +++++---- .../RazorTranslateDiagnosticsService.cs | 6 +++-- .../FindAllReferencesEndpoint.cs | 4 +++- .../Hover/HoverService.cs | 4 +++- .../Implementation/ImplementationEndpoint.cs | 8 ++++--- .../MapCode/MapCodeEndpoint.cs | 4 +++- .../SignatureHelp/SignatureHelpEndpoint.cs | 4 +++- .../DefaultVSLSPTagHelperTooltipFactory.cs | 6 +++-- .../Tooltip/VSLSPTagHelperTooltipFactory.cs | 4 +++- ...DefaultVSLSPTagHelperTooltipFactoryTest.cs | 4 +++- .../DefinitionEndpointDelegationTest.cs | 10 +++++---- .../RazorDiagnosticsPublisherTest.cs | 6 +++-- .../Hover/HoverServiceTest.cs | 5 +++-- ...tingEndpointTestBase.TestLanguageServer.cs | 22 ++++++++++--------- 16 files changed, 68 insertions(+), 37 deletions(-) diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionListOptimizer.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionListOptimizer.cs index 5147c57c251..2930882a7d2 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionListOptimizer.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionListOptimizer.cs @@ -1,9 +1,11 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See License.txt in the project root for license information. +extern alias RLSP; + using System.Collections.Generic; using System.Linq; -using AliasedVSCommitCharacters = Microsoft.VisualStudio.LanguageServer.Protocol.SumType; +using AliasedVSCommitCharacters = RLSP::Roslyn.LanguageServer.Protocol.SumType; namespace Microsoft.AspNetCore.Razor.LanguageServer.Completion; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/RazorCompletionItemResolver.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/RazorCompletionItemResolver.cs index c216ae10c6d..10caf85c23d 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/RazorCompletionItemResolver.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/RazorCompletionItemResolver.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See License.txt in the project root for license information. +extern alias RLSP; + using System; using System.Linq; using System.Threading; @@ -8,7 +10,7 @@ using Microsoft.AspNetCore.Razor.LanguageServer.Tooltip; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Razor.Completion; -using Microsoft.VisualStudio.Text.Adornments; +using RLSP::Roslyn.Text.Adornments; namespace Microsoft.AspNetCore.Razor.LanguageServer.Completion; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Definition/DefinitionEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Definition/DefinitionEndpoint.cs index 8082873a320..2ad9e1f829e 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Definition/DefinitionEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Definition/DefinitionEndpoint.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See License.txt in the project root for license information. +extern alias RLSP; + using System; using System.Linq; using System.Threading; @@ -17,10 +19,10 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; -using DefinitionResult = Microsoft.VisualStudio.LanguageServer.Protocol.SumType< - Microsoft.VisualStudio.LanguageServer.Protocol.VSInternalLocation, - Microsoft.VisualStudio.LanguageServer.Protocol.VSInternalLocation[], - Microsoft.VisualStudio.LanguageServer.Protocol.DocumentLink[]>; +using DefinitionResult = RLSP::Roslyn.LanguageServer.Protocol.SumType< + RLSP::Roslyn.LanguageServer.Protocol.VSInternalLocation, + RLSP::Roslyn.LanguageServer.Protocol.VSInternalLocation[], + RLSP::Roslyn.LanguageServer.Protocol.DocumentLink[]>; using SyntaxKind = Microsoft.AspNetCore.Razor.Language.SyntaxKind; namespace Microsoft.AspNetCore.Razor.LanguageServer.Definition; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorTranslateDiagnosticsService.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorTranslateDiagnosticsService.cs index f386fc9f19d..eb39e4e3440 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorTranslateDiagnosticsService.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/RazorTranslateDiagnosticsService.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See License.txt in the project root for license information. +extern alias RLSP; + using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; @@ -16,8 +18,8 @@ using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Text; -using Diagnostic = Microsoft.VisualStudio.LanguageServer.Protocol.Diagnostic; -using DiagnosticSeverity = Microsoft.VisualStudio.LanguageServer.Protocol.DiagnosticSeverity; +using Diagnostic = RLSP::Roslyn.LanguageServer.Protocol.Diagnostic; +using DiagnosticSeverity = RLSP::Roslyn.LanguageServer.Protocol.DiagnosticSeverity; using SyntaxNode = Microsoft.AspNetCore.Razor.Language.Syntax.SyntaxNode; namespace Microsoft.AspNetCore.Razor.LanguageServer.Diagnostics; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/FindAllReferences/FindAllReferencesEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/FindAllReferences/FindAllReferencesEndpoint.cs index 4d857727aeb..200dc902f69 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/FindAllReferences/FindAllReferencesEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/FindAllReferences/FindAllReferencesEndpoint.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See License.txt in the project root for license information. +extern alias RLSP; + using System; using System.Collections.Generic; using System.Linq; @@ -14,7 +16,7 @@ using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; -using Microsoft.VisualStudio.Text.Adornments; +using RLSP::Roslyn.Text.Adornments; namespace Microsoft.AspNetCore.Razor.LanguageServer.FindAllReferences; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/HoverService.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/HoverService.cs index 651010b0a12..f3989b6e031 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/HoverService.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/HoverService.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See License.txt in the project root for license information. +extern alias RLSP; + using System; using System.Collections.Generic; using System.Collections.Immutable; @@ -17,7 +19,7 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Tooltip; using Microsoft.VisualStudio.Editor.Razor; -using Microsoft.VisualStudio.Text.Adornments; +using RLSP::Roslyn.Text.Adornments; namespace Microsoft.AspNetCore.Razor.LanguageServer.Hover; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Implementation/ImplementationEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Implementation/ImplementationEndpoint.cs index 293b5652077..9d798be08b6 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Implementation/ImplementationEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Implementation/ImplementationEndpoint.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See License.txt in the project root for license information. +extern alias RLSP; + using System; using System.Threading; using System.Threading.Tasks; @@ -11,9 +13,9 @@ using Microsoft.CodeAnalysis.Razor.Logging; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; -using ImplementationResult = Microsoft.VisualStudio.LanguageServer.Protocol.SumType< - Microsoft.VisualStudio.LanguageServer.Protocol.Location[], - Microsoft.VisualStudio.LanguageServer.Protocol.VSInternalReferenceItem[]>; +using ImplementationResult = RLSP::Roslyn.LanguageServer.Protocol.SumType< + RLSP::Roslyn.LanguageServer.Protocol.Location[], + RLSP::Roslyn.LanguageServer.Protocol.VSInternalReferenceItem[]>; namespace Microsoft.AspNetCore.Razor.LanguageServer.Implementation; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/MapCode/MapCodeEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/MapCode/MapCodeEndpoint.cs index 47567f00ee5..b9dffd35e71 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/MapCode/MapCodeEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/MapCode/MapCodeEndpoint.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See License.txt in the project root for license information. +extern alias RLSP; + using System; using System.Collections.Generic; using System.Collections.Immutable; @@ -22,7 +24,7 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Text; -using Location = Microsoft.VisualStudio.LanguageServer.Protocol.Location; +using Location = RLSP::Roslyn.LanguageServer.Protocol.Location; using SyntaxNode = Microsoft.AspNetCore.Razor.Language.Syntax.SyntaxNode; namespace Microsoft.AspNetCore.Razor.LanguageServer.MapCode; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/SignatureHelp/SignatureHelpEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/SignatureHelp/SignatureHelpEndpoint.cs index f06cde3cf74..d3bdec59c84 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/SignatureHelp/SignatureHelpEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/SignatureHelp/SignatureHelpEndpoint.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See License.txt in the project root for license information. +extern alias RLSP; + using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.LanguageServer.EndpointContracts; @@ -13,7 +15,7 @@ namespace Microsoft.AspNetCore.Razor.LanguageServer.SignatureHelp; -using SignatureHelp = VisualStudio.LanguageServer.Protocol.SignatureHelp; +using SignatureHelp = RLSP::Roslyn.LanguageServer.Protocol.SignatureHelp; [RazorLanguageServerEndpoint(Methods.TextDocumentSignatureHelpName)] internal sealed class SignatureHelpEndpoint( diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Tooltip/DefaultVSLSPTagHelperTooltipFactory.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Tooltip/DefaultVSLSPTagHelperTooltipFactory.cs index 176f774ffa1..8843a67f808 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Tooltip/DefaultVSLSPTagHelperTooltipFactory.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Tooltip/DefaultVSLSPTagHelperTooltipFactory.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See License.txt in the project root for license information. +extern alias RLSP; + using System; using System.Collections.Generic; using System.Collections.Immutable; @@ -13,8 +15,8 @@ using Microsoft.AspNetCore.Razor.PooledObjects; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Tooltip; -using Microsoft.VisualStudio.Core.Imaging; -using Microsoft.VisualStudio.Text.Adornments; +using RLSP::Roslyn.Core.Imaging; +using RLSP::Roslyn.Text.Adornments; namespace Microsoft.AspNetCore.Razor.LanguageServer.Tooltip; diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Tooltip/VSLSPTagHelperTooltipFactory.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Tooltip/VSLSPTagHelperTooltipFactory.cs index f6ea104b830..7b5b9647080 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Tooltip/VSLSPTagHelperTooltipFactory.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Tooltip/VSLSPTagHelperTooltipFactory.cs @@ -1,13 +1,15 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See License.txt in the project root for license information. +extern alias RLSP; + using System.Diagnostics.CodeAnalysis; using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.LanguageServer.ProjectSystem; using Microsoft.CodeAnalysis.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Razor.Tooltip; -using Microsoft.VisualStudio.Text.Adornments; +using RLSP::Roslyn.Text.Adornments; namespace Microsoft.AspNetCore.Razor.LanguageServer.Tooltip; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/DefaultVSLSPTagHelperTooltipFactoryTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/DefaultVSLSPTagHelperTooltipFactoryTest.cs index 30e3a398773..5053fa9aba6 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/DefaultVSLSPTagHelperTooltipFactoryTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/DefaultVSLSPTagHelperTooltipFactoryTest.cs @@ -3,6 +3,8 @@ #nullable disable +extern alias RLSP; + using System; using System.Collections.Generic; using System.Collections.Immutable; @@ -11,7 +13,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.Test.Common.LanguageServer; using Microsoft.CodeAnalysis.Razor.Tooltip; -using Microsoft.VisualStudio.Text.Adornments; +using RLSP::Roslyn.Text.Adornments; using Xunit; using Xunit.Abstractions; using static Microsoft.AspNetCore.Razor.LanguageServer.Tooltip.DefaultVSLSPTagHelperTooltipFactory; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Definition/DefinitionEndpointDelegationTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Definition/DefinitionEndpointDelegationTest.cs index bc913d0cbca..a71df407a27 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Definition/DefinitionEndpointDelegationTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Definition/DefinitionEndpointDelegationTest.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See License.txt in the project root for license information. +extern alias RLSP; + using System; using System.Collections.Generic; using System.IO; @@ -12,10 +14,10 @@ using Microsoft.CodeAnalysis.Text; using Xunit; using Xunit.Abstractions; -using DefinitionResult = Microsoft.VisualStudio.LanguageServer.Protocol.SumType< - Microsoft.VisualStudio.LanguageServer.Protocol.VSInternalLocation, - Microsoft.VisualStudio.LanguageServer.Protocol.VSInternalLocation[], - Microsoft.VisualStudio.LanguageServer.Protocol.DocumentLink[]>; +using DefinitionResult = RLSP::Roslyn.LanguageServer.Protocol.SumType< + RLSP::Roslyn.LanguageServer.Protocol.VSInternalLocation, + RLSP::Roslyn.LanguageServer.Protocol.VSInternalLocation[], + RLSP::Roslyn.LanguageServer.Protocol.DocumentLink[]>; namespace Microsoft.AspNetCore.Razor.LanguageServer.Definition; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/RazorDiagnosticsPublisherTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/RazorDiagnosticsPublisherTest.cs index 9011fd45176..0a0cd140b7b 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/RazorDiagnosticsPublisherTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Diagnostics/RazorDiagnosticsPublisherTest.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See License.txt in the project root for license information. +extern alias RLSP; + using System; using System.Linq; using System.Threading; @@ -21,8 +23,8 @@ using Moq; using Xunit; using Xunit.Abstractions; -using Diagnostic = Microsoft.VisualStudio.LanguageServer.Protocol.Diagnostic; -using DiagnosticSeverity = Microsoft.VisualStudio.LanguageServer.Protocol.DiagnosticSeverity; +using Diagnostic = RLSP::Roslyn.LanguageServer.Protocol.Diagnostic; +using DiagnosticSeverity = RLSP::Roslyn.LanguageServer.Protocol.DiagnosticSeverity; using RazorDiagnosticFactory = Microsoft.AspNetCore.Razor.Language.RazorDiagnosticFactory; namespace Microsoft.AspNetCore.Razor.LanguageServer.Diagnostics; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Hover/HoverServiceTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Hover/HoverServiceTest.cs index 3c358abc519..fe9c7d04014 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Hover/HoverServiceTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Hover/HoverServiceTest.cs @@ -3,6 +3,7 @@ #nullable disable +extern alias RLSP; using System; using System.Linq; using System.Threading; @@ -22,8 +23,8 @@ using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.Text.Adornments; using Moq; +using RLSP::Roslyn.Text.Adornments; using Xunit; using Xunit.Abstractions; using static Microsoft.AspNetCore.Razor.LanguageServer.Tooltip.DefaultVSLSPTagHelperTooltipFactory; @@ -1012,7 +1013,7 @@ public async Task SendRequestAsync(string method, Position = hoverParams.ProjectedPosition }; - var result = await _csharpServer.ExecuteRequestAsync( + var result = await _csharpServer.ExecuteRequestAsync( Methods.TextDocumentHoverName, hoverRequest, _cancellationToken); return result; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/SingleServerDelegatingEndpointTestBase.TestLanguageServer.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/SingleServerDelegatingEndpointTestBase.TestLanguageServer.cs index 1f260dac179..f7df2e2ca37 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/SingleServerDelegatingEndpointTestBase.TestLanguageServer.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/SingleServerDelegatingEndpointTestBase.TestLanguageServer.cs @@ -3,6 +3,8 @@ #nullable disable +extern alias RLSP; + using System; using System.Threading; using System.Threading.Tasks; @@ -14,14 +16,14 @@ using Microsoft.CodeAnalysis.Razor.Protocol.Diagnostics; using Microsoft.CodeAnalysis.Razor.Protocol.Folding; using Xunit; -using DefinitionResult = Microsoft.VisualStudio.LanguageServer.Protocol.SumType< - Microsoft.VisualStudio.LanguageServer.Protocol.VSInternalLocation, - Microsoft.VisualStudio.LanguageServer.Protocol.VSInternalLocation[], - Microsoft.VisualStudio.LanguageServer.Protocol.DocumentLink[]>; -using ImplementationResult = Microsoft.VisualStudio.LanguageServer.Protocol.SumType< - Microsoft.VisualStudio.LanguageServer.Protocol.Location[], - Microsoft.VisualStudio.LanguageServer.Protocol.VSInternalReferenceItem[]>; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using DefinitionResult = RLSP::Roslyn.LanguageServer.Protocol.SumType< + RLSP::Roslyn.LanguageServer.Protocol.VSInternalLocation, + RLSP::Roslyn.LanguageServer.Protocol.VSInternalLocation[], + RLSP::Roslyn.LanguageServer.Protocol.DocumentLink[]>; +using ImplementationResult = RLSP::Roslyn.LanguageServer.Protocol.SumType< + RLSP::Roslyn.LanguageServer.Protocol.Location[], + RLSP::Roslyn.LanguageServer.Protocol.VSInternalReferenceItem[]>; +using LspSignatureHelp = RLSP::Roslyn.LanguageServer.Protocol.SignatureHelp; namespace Microsoft.AspNetCore.Razor.LanguageServer; @@ -269,7 +271,7 @@ private Task HandleImplementationAsync(T @params) _cancellationToken); } - private Task HandleSignatureHelpAsync(T @params) + private Task HandleSignatureHelpAsync(T @params) { var delegatedParams = Assert.IsType(@params); var delegatedRequest = new SignatureHelpParams() @@ -282,7 +284,7 @@ private Task HandleImplementationAsync(T @params) Position = delegatedParams.ProjectedPosition, }; - return _csharpServer.ExecuteRequestAsync( + return _csharpServer.ExecuteRequestAsync( Methods.TextDocumentSignatureHelpName, delegatedRequest, _cancellationToken); From bbb5adbab1c47c42482010bb6ff48efa8d922e55 Mon Sep 17 00:00:00 2001 From: David Wengier Date: Tue, 30 Jul 2024 14:08:13 +1000 Subject: [PATCH 09/20] Move Lsp helpers into the right namespace --- .../Extensions/LspExtensions_LinePosition.cs | 2 +- .../Extensions/LspExtensions_LinePositionSpan.cs | 2 +- .../Extensions/LspExtensions_Position.cs | 2 +- .../Extensions/LspExtensions_Range.cs | 2 +- .../Extensions/LspExtensions_RazorSyntaxTree.cs | 2 +- .../Extensions/LspExtensions_SourceText.cs | 2 +- .../Extensions/LspExtensions_SumTypes.cs | 2 +- .../Extensions/LspExtensions_SyntaxNode.cs | 2 +- .../Extensions/LspExtensions_TextChange.cs | 2 +- .../Extensions/LspExtensions_TextDocumentIdentifier.cs | 2 +- .../Extensions/LspExtensions_VSInternalClientCapabilities.cs | 2 +- .../Extensions/LspExtensions_VSProjectContext.cs | 2 +- .../Extensions/LspExtensions_WorkspaceEdit.cs | 2 +- .../Extensions/LspFactory.cs | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePosition.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePosition.cs index 38050f87ca5..9e48d992ea0 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePosition.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePosition.cs @@ -3,7 +3,7 @@ using Microsoft.CodeAnalysis.Text; -namespace Microsoft.VisualStudio.LanguageServer.Protocol; +namespace Roslyn.LanguageServer.Protocol; internal static partial class LspExtensions { diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePositionSpan.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePositionSpan.cs index 66422294e98..456a3f911a1 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePositionSpan.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_LinePositionSpan.cs @@ -3,7 +3,7 @@ using Microsoft.CodeAnalysis.Text; -namespace Microsoft.VisualStudio.LanguageServer.Protocol; +namespace Roslyn.LanguageServer.Protocol; internal static partial class LspExtensions { diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Position.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Position.cs index 5156ecc9c3e..efa8366d6d4 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Position.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Position.cs @@ -3,7 +3,7 @@ using Microsoft.CodeAnalysis.Text; -namespace Microsoft.VisualStudio.LanguageServer.Protocol; +namespace Roslyn.LanguageServer.Protocol; internal static partial class LspExtensions { diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Range.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Range.cs index 0a5a07f8583..d2becba878c 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Range.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_Range.cs @@ -3,7 +3,7 @@ using Microsoft.CodeAnalysis.Text; -namespace Microsoft.VisualStudio.LanguageServer.Protocol; +namespace Roslyn.LanguageServer.Protocol; internal static partial class LspExtensions { diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_RazorSyntaxTree.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_RazorSyntaxTree.cs index 0316dfc4624..fa4d5f9b090 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_RazorSyntaxTree.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_RazorSyntaxTree.cs @@ -5,7 +5,7 @@ using Microsoft.AspNetCore.Razor.Language.Syntax; using Microsoft.CodeAnalysis.Text; -namespace Microsoft.VisualStudio.LanguageServer.Protocol; +namespace Roslyn.LanguageServer.Protocol; internal static partial class LspExtensions { diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SourceText.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SourceText.cs index 086c5312dd0..c41691fc67b 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SourceText.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SourceText.cs @@ -5,7 +5,7 @@ using Microsoft.AspNetCore.Razor.Language; using Microsoft.CodeAnalysis.Text; -namespace Microsoft.VisualStudio.LanguageServer.Protocol; +namespace Roslyn.LanguageServer.Protocol; internal static partial class LspExtensions { diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SumTypes.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SumTypes.cs index 7da5906093f..4a349e70091 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SumTypes.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SumTypes.cs @@ -5,7 +5,7 @@ using System.Linq; using Microsoft.AspNetCore.Razor; -namespace Microsoft.VisualStudio.LanguageServer.Protocol; +namespace Roslyn.LanguageServer.Protocol; internal static partial class LspExtensions { diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SyntaxNode.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SyntaxNode.cs index 95a6ef118a7..9cde6abc263 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SyntaxNode.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_SyntaxNode.cs @@ -7,7 +7,7 @@ using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Text; -namespace Microsoft.VisualStudio.LanguageServer.Protocol; +namespace Roslyn.LanguageServer.Protocol; internal static partial class LspExtensions { diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_TextChange.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_TextChange.cs index 36077f4b831..91c400b9eff 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_TextChange.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_TextChange.cs @@ -4,7 +4,7 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Text; -namespace Microsoft.VisualStudio.LanguageServer.Protocol; +namespace Roslyn.LanguageServer.Protocol; internal static partial class LspExtensions { diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_TextDocumentIdentifier.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_TextDocumentIdentifier.cs index 9029bc33fdd..f08c33b7ad7 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_TextDocumentIdentifier.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_TextDocumentIdentifier.cs @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See License.txt in the project root for license information. -namespace Microsoft.VisualStudio.LanguageServer.Protocol; +namespace Roslyn.LanguageServer.Protocol; internal static partial class LspExtensions { diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_VSInternalClientCapabilities.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_VSInternalClientCapabilities.cs index f1e3a5e0373..0d8e0aab7c3 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_VSInternalClientCapabilities.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_VSInternalClientCapabilities.cs @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See License.txt in the project root for license information. -namespace Microsoft.VisualStudio.LanguageServer.Protocol; +namespace Roslyn.LanguageServer.Protocol; internal static partial class LspExtensions { diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_VSProjectContext.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_VSProjectContext.cs index 8bd3e97e1e4..9e678758b4f 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_VSProjectContext.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_VSProjectContext.cs @@ -3,7 +3,7 @@ using Microsoft.AspNetCore.Razor.ProjectSystem; -namespace Microsoft.VisualStudio.LanguageServer.Protocol; +namespace Roslyn.LanguageServer.Protocol; internal static partial class LspExtensions { diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_WorkspaceEdit.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_WorkspaceEdit.cs index 6178287c63e..f27a8842657 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_WorkspaceEdit.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspExtensions_WorkspaceEdit.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -namespace Microsoft.VisualStudio.LanguageServer.Protocol; +namespace Roslyn.LanguageServer.Protocol; internal static partial class LspExtensions { diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspFactory.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspFactory.cs index e57f55c8e25..1b82ab8653b 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspFactory.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/LspFactory.cs @@ -4,7 +4,7 @@ using System.Diagnostics; using Microsoft.CodeAnalysis.Text; -namespace Microsoft.VisualStudio.LanguageServer.Protocol; +namespace Roslyn.LanguageServer.Protocol; internal static class LspFactory { From e4537e0611bab17c15cdf2cc8f4d9154947ac807 Mon Sep 17 00:00:00 2001 From: David Wengier Date: Tue, 30 Jul 2024 14:10:01 +1000 Subject: [PATCH 10/20] Adjust namespaces and factory method names --- .../MapCode/Mappers/InsertMapper.cs | 5 ++--- .../Protocol/DelegatedTypes.cs | 1 + .../DocumentHighlight/RemoteDocumentHighlight.cs | 10 ++++------ .../Remote/IRemoteSignatureHelpService.cs | 6 ++---- .../RemoteDocumentHighlightService.cs | 7 +++---- .../FoldingRanges/RemoteFoldingRangeService.cs | 2 +- .../ProjectSystem/DocumentContextFactory.cs | 2 +- .../CohostDocumentHighlightPresentationEndpoint.cs | 2 +- .../LanguageClient/RazorDocumentOptionsService.cs | 2 +- src/Razor/src/rzls/LspLogger.cs | 2 +- .../DocumentContextFactoryTest.cs | 2 +- .../Semantic/RazorSemanticTokensLegendServiceTest.cs | 2 +- .../RazorToolingIntegrationTestBase.cs | 3 ++- .../LanguageServer/CSharpTestLspServerHelpers.cs | 2 +- .../LanguageServer/LanguageServerTestBase.cs | 2 +- .../LanguageServer/TestClientCapabilitiesService.cs | 2 +- .../TestRazorSemanticTokensLegendService.cs | 2 +- .../Cohost/CohostDocumentHighlightEndpointTest.cs | 2 +- .../Cohost/CohostFoldingRangeEndpointTest.cs | 2 +- .../Cohost/CohostLinkedEditingRangeEndpointTest.cs | 2 +- .../Cohost/CohostSignatureHelpEndpointTest.cs | 2 +- .../Cohost/CohostUriPresentationEndpointTest.cs | 2 +- .../Debugging/DefaultRazorBreakpointResolverTest.cs | 4 ++-- .../DefaultRazorProximityExpressionResolverTest.cs | 2 +- .../Debugging/TestLSPBreakpointSpanProvider.cs | 4 ++-- .../DefaultLSPDocumentMappingProviderTest.cs | 2 +- .../LanguageClient/RazorCustomMessageTargetTest.cs | 2 +- .../LanguageClient/RazorLSPSpanMappingServiceTest.cs | 4 ++-- .../LanguageClient/TestDocumentManager.cs | 2 +- .../LanguageClient/TestRazorLSPSpanMappingService.cs | 2 +- .../RazorLanguageService_IVsLanguageDebugInfoTest.cs | 2 +- 31 files changed, 42 insertions(+), 46 deletions(-) diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/MapCode/Mappers/InsertMapper.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/MapCode/Mappers/InsertMapper.cs index edd26152e62..9f77fb752f9 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/MapCode/Mappers/InsertMapper.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/MapCode/Mappers/InsertMapper.cs @@ -4,7 +4,6 @@ using Microsoft.AspNetCore.Razor.Language.Syntax; using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Text; -using LSP = Microsoft.VisualStudio.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.MapCode.Mappers; @@ -13,7 +12,7 @@ internal static class InsertMapper public static int? GetInsertionPoint( SyntaxNode documentRoot, SourceText sourceText, - LSP.Location focusArea) + Location focusArea) { // If there's an specific focus area, or caret provided, we should try to insert as close as possible. // As long as the focused area is not empty. @@ -34,7 +33,7 @@ internal static class InsertMapper private static bool TryGetFocusedInsertionPoint( SyntaxNode documentRoot, SourceText sourceText, - LSP.Location focusArea, + Location focusArea, out int insertionPoint) { // If there's an specific focus area, or caret provided, we should try to insert as close as possible. diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DelegatedTypes.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DelegatedTypes.cs index d222c5325e1..3dd7e4bb4e7 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DelegatedTypes.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DelegatedTypes.cs @@ -10,6 +10,7 @@ namespace Microsoft.CodeAnalysis.Razor.Protocol; +using Location = Roslyn.LanguageServer.Protocol.Location; internal record DelegatedSpellCheckParams( [property: JsonPropertyName("identifier")] TextDocumentIdentifierAndVersion Identifier); diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentHighlight/RemoteDocumentHighlight.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentHighlight/RemoteDocumentHighlight.cs index 2dbe5a47bf8..8f6ef190cd8 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentHighlight/RemoteDocumentHighlight.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Protocol/DocumentHighlight/RemoteDocumentHighlight.cs @@ -3,9 +3,7 @@ using System.Runtime.Serialization; using Microsoft.CodeAnalysis.Text; -using static Roslyn.LanguageServer.Protocol.LspExtensions; -using RoslynDocumentHighlight = Roslyn.LanguageServer.Protocol.DocumentHighlight; -using VsDocumentHighlight = Microsoft.VisualStudio.LanguageServer.Protocol.DocumentHighlight; +using LspDocumentHighlight = Roslyn.LanguageServer.Protocol.DocumentHighlight; namespace Microsoft.CodeAnalysis.Razor.Protocol.DocumentHighlight; @@ -14,10 +12,10 @@ internal readonly record struct RemoteDocumentHighlight( [property: DataMember(Order = 0)] LinePositionSpan Span, [property: DataMember(Order = 1)] DocumentHighlightKind Kind) { - public static RemoteDocumentHighlight FromRoslynDocumentHighlight(RoslynDocumentHighlight highlight) - => new(highlight.Range.ToLinePositionSpan(), (DocumentHighlightKind)highlight.Kind); + public static RemoteDocumentHighlight FromLspDocumentHighlight(LspDocumentHighlight highlight) + => new(highlight.Range.ToLinePositionSpan(), highlight.Kind); - public static VsDocumentHighlight ToVsDocumentHighlight(RemoteDocumentHighlight highlight) + public static LspDocumentHighlight ToLspDocumentHighlight(RemoteDocumentHighlight highlight) => new() { Range = LspExtensions.ToRange(highlight.Span), diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Remote/IRemoteSignatureHelpService.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Remote/IRemoteSignatureHelpService.cs index 82163933eef..f8c4b384d01 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Remote/IRemoteSignatureHelpService.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Remote/IRemoteSignatureHelpService.cs @@ -4,13 +4,11 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis.ExternalAccess.Razor; -using Roslyn.LanguageServer.Protocol; +using LspSignatureHelp = Roslyn.LanguageServer.Protocol.SignatureHelp; namespace Microsoft.CodeAnalysis.Razor.Remote; -using SignatureHelp = Roslyn.LanguageServer.Protocol.SignatureHelp; - internal interface IRemoteSignatureHelpService : IRemoteJsonService { - ValueTask GetSignatureHelpAsync(JsonSerializableRazorPinnedSolutionInfoWrapper solutionInfo, JsonSerializableDocumentId documentId, Position linePosition, CancellationToken cancellationToken); + ValueTask GetSignatureHelpAsync(JsonSerializableRazorPinnedSolutionInfoWrapper solutionInfo, JsonSerializableDocumentId documentId, Position linePosition, CancellationToken cancellationToken); } diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/DocumentHighlight/RemoteDocumentHighlightService.cs b/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/DocumentHighlight/RemoteDocumentHighlightService.cs index f2d62ed9ed2..426e81fd249 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/DocumentHighlight/RemoteDocumentHighlightService.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/DocumentHighlight/RemoteDocumentHighlightService.cs @@ -14,8 +14,7 @@ using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Remote.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Text; -using static Microsoft.VisualStudio.LanguageServer.Protocol.LspExtensions; -using static Roslyn.LanguageServer.Protocol.LspExtensions; +using Roslyn.LanguageServer.Protocol; using Response = Microsoft.CodeAnalysis.Razor.Remote.RemoteResponse; namespace Microsoft.CodeAnalysis.Remote.Razor; @@ -80,8 +79,8 @@ private async ValueTask GetHighlightsAsync( { if (_documentMappingService.TryMapToHostDocumentRange(csharpDocument, highlight.Range.ToLinePositionSpan(), out var mappedRange)) { - highlight.Range = Roslyn.LanguageServer.Protocol.LspExtensions.ToRange(mappedRange); - results.Add(RemoteDocumentHighlight.FromRoslynDocumentHighlight(highlight)); + highlight.Range = mappedRange.ToRange(); + results.Add(RemoteDocumentHighlight.FromLspDocumentHighlight(highlight)); } } diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/FoldingRanges/RemoteFoldingRangeService.cs b/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/FoldingRanges/RemoteFoldingRangeService.cs index 5fed4a0a437..e6e9b214039 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/FoldingRanges/RemoteFoldingRangeService.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/FoldingRanges/RemoteFoldingRangeService.cs @@ -11,7 +11,7 @@ using Microsoft.CodeAnalysis.Razor.Remote; using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Remote.Razor.ProjectSystem; -using Microsoft.VisualStudio.LanguageServer.Protocol; +using Roslyn.LanguageServer.Protocol; using ExternalHandlers = Microsoft.CodeAnalysis.ExternalAccess.Razor.Cohost.Handlers; namespace Microsoft.CodeAnalysis.Remote.Razor; diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/ProjectSystem/DocumentContextFactory.cs b/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/ProjectSystem/DocumentContextFactory.cs index a23e018bcd1..39b3f530699 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/ProjectSystem/DocumentContextFactory.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/ProjectSystem/DocumentContextFactory.cs @@ -5,7 +5,7 @@ using System.Composition; using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis.Razor.ProjectSystem; -using Microsoft.VisualStudio.LanguageServer.Protocol; +using Roslyn.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.Remote.Razor.ProjectSystem; diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostDocumentHighlightPresentationEndpoint.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostDocumentHighlightPresentationEndpoint.cs index 9dc3095ef81..4461d08211e 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostDocumentHighlightPresentationEndpoint.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostDocumentHighlightPresentationEndpoint.cs @@ -70,7 +70,7 @@ internal class CohostDocumentHighlightEndpoint( // If we got a response back, then either Razor or C# wants to do something with this, so we're good to go if (csharpResult.Result is { } highlights) { - return highlights.Select(RemoteDocumentHighlight.ToVsDocumentHighlight).ToArray(); + return highlights.Select(RemoteDocumentHighlight.ToLspDocumentHighlight).ToArray(); } if (csharpResult.StopHandling) diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/RazorDocumentOptionsService.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/RazorDocumentOptionsService.cs index dd97a0de2e6..e1c36a7c57e 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/RazorDocumentOptionsService.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/RazorDocumentOptionsService.cs @@ -8,10 +8,10 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.ExternalAccess.Razor.Api; -using Microsoft.CodeAnalysis.Formatting; using Microsoft.CodeAnalysis.Options; using Microsoft.CodeAnalysis.Razor.Settings; using Microsoft.VisualStudio.Razor.Settings; +using FormattingOptions = Microsoft.CodeAnalysis.Formatting.FormattingOptions; namespace Microsoft.VisualStudio.Razor.LanguageClient; diff --git a/src/Razor/src/rzls/LspLogger.cs b/src/Razor/src/rzls/LspLogger.cs index 0f032ed436f..5e86435a8fd 100644 --- a/src/Razor/src/rzls/LspLogger.cs +++ b/src/Razor/src/rzls/LspLogger.cs @@ -5,8 +5,8 @@ using System.Threading; using Microsoft.AspNetCore.Razor.LanguageServer.Hosting; using Microsoft.CodeAnalysis.Razor.Logging; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Threading; +using Roslyn.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentContextFactoryTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentContextFactoryTest.cs index 31394f347d2..9d84aea0076 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentContextFactoryTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/DocumentContextFactoryTest.cs @@ -125,7 +125,7 @@ await _projectManager.UpdateAsync(updater => }); // Act - Assert.True(factory.TryCreate(uri, new VisualStudio.LanguageServer.Protocol.VSProjectContext { Id = hostProject.Key.Id }, out var documentContext)); + Assert.True(factory.TryCreate(uri, new VSProjectContext { Id = hostProject.Key.Id }, out var documentContext)); // Assert Assert.Equal(uri, documentContext.Uri); diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Semantic/RazorSemanticTokensLegendServiceTest.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Semantic/RazorSemanticTokensLegendServiceTest.cs index caea278d09c..f4ae741cf15 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Semantic/RazorSemanticTokensLegendServiceTest.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Semantic/RazorSemanticTokensLegendServiceTest.cs @@ -15,7 +15,7 @@ public class RazorSemanticTokensLegendServiceTest(ITestOutputHelper testOutput) [Fact] public void RazorModifiers_MustStartAfterRoslyn() { - var clientCapabilitiesService = new TestClientCapabilitiesService(new VisualStudio.LanguageServer.Protocol.VSInternalClientCapabilities()); + var clientCapabilitiesService = new TestClientCapabilitiesService(new VSInternalClientCapabilities()); var service = new RazorSemanticTokensLegendService(clientCapabilitiesService); var expected = Math.Pow(2, RazorSemanticTokensAccessor.GetTokenModifiers().Length); diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/Language/IntegrationTests/RazorToolingIntegrationTestBase.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/Language/IntegrationTests/RazorToolingIntegrationTestBase.cs index d473acb5ccc..183059cb0ef 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/Language/IntegrationTests/RazorToolingIntegrationTestBase.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/Language/IntegrationTests/RazorToolingIntegrationTestBase.cs @@ -20,6 +20,7 @@ using Xunit; using Xunit.Abstractions; using Xunit.Sdk; +using Diagnostic = Microsoft.CodeAnalysis.Diagnostic; namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests; @@ -280,7 +281,7 @@ protected static CompileToAssemblyResult CompileToAssembly(CompileToCSharpResult var diagnostics = compilation .GetDiagnostics() - .Where(d => d.Severity != DiagnosticSeverity.Hidden); + .Where(d => d.Severity != CodeAnalysis.DiagnosticSeverity.Hidden); if (diagnostics.Any() && throwOnFailure) { diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/CSharpTestLspServerHelpers.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/CSharpTestLspServerHelpers.cs index ddae8ddf089..a2bc4d4c283 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/CSharpTestLspServerHelpers.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/CSharpTestLspServerHelpers.cs @@ -20,7 +20,7 @@ using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; using Microsoft.VisualStudio.Composition; -using Microsoft.VisualStudio.LanguageServer.Protocol; +using Roslyn.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.Test.Common.LanguageServer; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/LanguageServerTestBase.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/LanguageServerTestBase.cs index e7e0f6e87e2..94e468b717a 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/LanguageServerTestBase.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/LanguageServerTestBase.cs @@ -23,7 +23,7 @@ using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Text; using Microsoft.CommonLanguageServerProtocol.Framework; -using Microsoft.VisualStudio.LanguageServer.Protocol; +using Roslyn.LanguageServer.Protocol; using Xunit.Abstractions; namespace Microsoft.AspNetCore.Razor.Test.Common.LanguageServer; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/TestClientCapabilitiesService.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/TestClientCapabilitiesService.cs index f3dd0cb02d6..e7c1af358c4 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/TestClientCapabilitiesService.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/TestClientCapabilitiesService.cs @@ -2,7 +2,7 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using Microsoft.CodeAnalysis.Razor.Protocol; -using Microsoft.VisualStudio.LanguageServer.Protocol; +using Roslyn.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Test; diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/TestRazorSemanticTokensLegendService.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/TestRazorSemanticTokensLegendService.cs index 95def5825fc..11e8fb3ce75 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/TestRazorSemanticTokensLegendService.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/TestRazorSemanticTokensLegendService.cs @@ -2,7 +2,7 @@ // Licensed under the MIT license. See License.txt in the project root for license information. using Microsoft.AspNetCore.Razor.LanguageServer.Test; -using Microsoft.VisualStudio.LanguageServer.Protocol; +using Roslyn.LanguageServer.Protocol; namespace Microsoft.AspNetCore.Razor.LanguageServer.Semantic; diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostDocumentHighlightEndpointTest.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostDocumentHighlightEndpointTest.cs index ce044474c00..76732cd08df 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostDocumentHighlightEndpointTest.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostDocumentHighlightEndpointTest.cs @@ -7,7 +7,7 @@ using Microsoft.CodeAnalysis.ExternalAccess.Razor; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; +using Roslyn.LanguageServer.Protocol; using Roslyn.Test.Utilities; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostFoldingRangeEndpointTest.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostFoldingRangeEndpointTest.cs index 08ad6977496..ac3223d035b 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostFoldingRangeEndpointTest.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostFoldingRangeEndpointTest.cs @@ -10,7 +10,7 @@ using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; +using Roslyn.LanguageServer.Protocol; using Roslyn.Test.Utilities; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostLinkedEditingRangeEndpointTest.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostLinkedEditingRangeEndpointTest.cs index cd2c7baddaa..b47b38da824 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostLinkedEditingRangeEndpointTest.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostLinkedEditingRangeEndpointTest.cs @@ -7,7 +7,7 @@ using Microsoft.CodeAnalysis.Razor.LinkedEditingRange; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; +using Roslyn.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostSignatureHelpEndpointTest.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostSignatureHelpEndpointTest.cs index 276e1de71a1..bbbf89e86ee 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostSignatureHelpEndpointTest.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostSignatureHelpEndpointTest.cs @@ -7,7 +7,7 @@ using Microsoft.CodeAnalysis.Razor.Settings; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; +using Roslyn.LanguageServer.Protocol; using Microsoft.VisualStudio.LanguageServices.Razor.LanguageClient.Cohost; using Microsoft.VisualStudio.Razor.Settings; using Xunit; diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostUriPresentationEndpointTest.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostUriPresentationEndpointTest.cs index 0ca41897540..177069acf8c 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostUriPresentationEndpointTest.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostUriPresentationEndpointTest.cs @@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Razor.Test.Common; using Microsoft.CodeAnalysis.ExternalAccess.Razor; using Microsoft.CodeAnalysis.Testing; -using Microsoft.VisualStudio.LanguageServer.Protocol; +using Roslyn.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/Debugging/DefaultRazorBreakpointResolverTest.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/Debugging/DefaultRazorBreakpointResolverTest.cs index fac2bc3b725..4111423ef10 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/Debugging/DefaultRazorBreakpointResolverTest.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/Debugging/DefaultRazorBreakpointResolverTest.cs @@ -9,13 +9,13 @@ using Microsoft.AspNetCore.Razor.Test.Common; using Microsoft.AspNetCore.Razor.Test.Common.Editor; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using Microsoft.VisualStudio.LanguageServer.Protocol; +using Roslyn.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.Debugging; using Microsoft.VisualStudio.Text; using Moq; using Xunit; using Xunit.Abstractions; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Roslyn.LanguageServer.Protocol.Range; namespace Microsoft.VisualStudio.Razor.LanguageClient.Debugging; diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/Debugging/DefaultRazorProximityExpressionResolverTest.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/Debugging/DefaultRazorProximityExpressionResolverTest.cs index b107a2fb3fc..ab5942e4f27 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/Debugging/DefaultRazorProximityExpressionResolverTest.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/Debugging/DefaultRazorProximityExpressionResolverTest.cs @@ -11,10 +11,10 @@ using Microsoft.AspNetCore.Razor.Test.Common.Editor; using Microsoft.AspNetCore.Razor.Threading; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using Microsoft.VisualStudio.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.Debugging; using Microsoft.VisualStudio.Text; using Moq; +using Roslyn.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/Debugging/TestLSPBreakpointSpanProvider.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/Debugging/TestLSPBreakpointSpanProvider.cs index d3d3e64669f..bb5323c0524 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/Debugging/TestLSPBreakpointSpanProvider.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/Debugging/TestLSPBreakpointSpanProvider.cs @@ -10,8 +10,8 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.Threading; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using Microsoft.VisualStudio.LanguageServer.Protocol; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using Roslyn.LanguageServer.Protocol; +using LspRange = Roslyn.LanguageServer.Protocol.Range; namespace Microsoft.VisualStudio.Razor.LanguageClient.Debugging; diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/DocumentMapping/DefaultLSPDocumentMappingProviderTest.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/DocumentMapping/DefaultLSPDocumentMappingProviderTest.cs index 742509d06af..3cd1a5a489c 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/DocumentMapping/DefaultLSPDocumentMappingProviderTest.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/DocumentMapping/DefaultLSPDocumentMappingProviderTest.cs @@ -11,7 +11,7 @@ using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.DocumentMapping; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using Microsoft.VisualStudio.LanguageServer.Protocol; +using Roslyn.LanguageServer.Protocol; using Microsoft.VisualStudio.Text; using Moq; using Xunit; diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/RazorCustomMessageTargetTest.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/RazorCustomMessageTargetTest.cs index 419fa70db8a..ee46d9348b9 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/RazorCustomMessageTargetTest.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/RazorCustomMessageTargetTest.cs @@ -18,7 +18,7 @@ using Microsoft.CodeAnalysis.Razor.Workspaces; using Microsoft.CodeAnalysis.Razor.Workspaces.Protocol.SemanticTokens; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using Microsoft.VisualStudio.LanguageServer.Protocol; +using Roslyn.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.LanguageClient.Cohost; using Microsoft.VisualStudio.Razor.Settings; using Microsoft.VisualStudio.Razor.Snippets; diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/RazorLSPSpanMappingServiceTest.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/RazorLSPSpanMappingServiceTest.cs index 639a3f16a58..d77b5f1c0a8 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/RazorLSPSpanMappingServiceTest.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/RazorLSPSpanMappingServiceTest.cs @@ -13,12 +13,12 @@ using Microsoft.CodeAnalysis.Razor.Protocol.DocumentMapping; using Microsoft.CodeAnalysis.Text; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using Microsoft.VisualStudio.LanguageServer.Protocol; +using Roslyn.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.LanguageClient.DocumentMapping; using Moq; using Xunit; using Xunit.Abstractions; -using LspRange = Microsoft.VisualStudio.LanguageServer.Protocol.Range; +using LspRange = Roslyn.LanguageServer.Protocol.Range; namespace Microsoft.VisualStudio.Razor.LanguageClient; diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/TestDocumentManager.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/TestDocumentManager.cs index 9c3a2717d15..4c93d3b3488 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/TestDocumentManager.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/TestDocumentManager.cs @@ -11,7 +11,7 @@ using Microsoft.AspNetCore.Razor.Test.Common.LanguageServer; using Microsoft.CodeAnalysis.Text; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; -using Microsoft.VisualStudio.LanguageServer.Protocol; +using Roslyn.LanguageServer.Protocol; using Microsoft.VisualStudio.Text; namespace Microsoft.VisualStudio.Razor.LanguageClient; diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/TestRazorLSPSpanMappingService.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/TestRazorLSPSpanMappingService.cs index 3b46d91e9c7..36022330fd0 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/TestRazorLSPSpanMappingService.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/TestRazorLSPSpanMappingService.cs @@ -11,7 +11,7 @@ using Microsoft.CodeAnalysis.ExternalAccess.Razor; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Text; -using Microsoft.VisualStudio.LanguageServer.Protocol; +using Roslyn.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.LanguageClient.DocumentMapping; namespace Microsoft.VisualStudio.Razor.LanguageClient; diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/RazorLanguageService_IVsLanguageDebugInfoTest.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/RazorLanguageService_IVsLanguageDebugInfoTest.cs index 45058bebe8d..463bf0e743a 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/RazorLanguageService_IVsLanguageDebugInfoTest.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/RazorLanguageService_IVsLanguageDebugInfoTest.cs @@ -9,7 +9,7 @@ using Microsoft.AspNetCore.Razor.Test.Common; using Microsoft.AspNetCore.Razor.Test.Common.Editor; using Microsoft.VisualStudio.Editor; -using Microsoft.VisualStudio.LanguageServer.Protocol; +using Roslyn.LanguageServer.Protocol; using Microsoft.VisualStudio.Razor.Debugging; using Microsoft.VisualStudio.Text; using Microsoft.VisualStudio.TextManager.Interop; From 606777980aaa62f1294498e64594db052d0973d3 Mon Sep 17 00:00:00 2001 From: David Wengier Date: Tue, 30 Jul 2024 14:10:23 +1000 Subject: [PATCH 11/20] Adjust visibility on a couple of things --- .../Formatting_NetFx/FormattingTestBase.cs | 4 ++-- .../LanguageServer/CSharpTestLspServer.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingTestBase.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingTestBase.cs index d4a09040768..8a58ab622e9 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingTestBase.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingTestBase.cs @@ -151,7 +151,7 @@ private protected async Task RunOnTypeFormattingTestAsync( } } - protected async Task RunCodeActionFormattingTestAsync( + private protected async Task RunCodeActionFormattingTestAsync( string input, TextEdit[] codeActionEdits, string expected, @@ -206,7 +206,7 @@ protected async Task RunCodeActionFormattingTestAsync( AssertEx.EqualOrDiff(expected, actual); } - protected static TextEdit Edit(int startLine, int startChar, int endLine, int endChar, string newText) + private protected static TextEdit Edit(int startLine, int startChar, int endLine, int endChar, string newText) => LspFactory.CreateTextEdit(startLine, startChar, endLine, endChar, newText); private static SourceText ApplyEdits(SourceText source, TextEdit[] edits) diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/CSharpTestLspServer.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/CSharpTestLspServer.cs index f3559f2fd8d..8830418e46d 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/CSharpTestLspServer.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/CSharpTestLspServer.cs @@ -172,7 +172,7 @@ static DidOpenTextDocumentParams CreateDidOpenTextDocumentParams(Uri uri, string }; } - public async Task ReplaceTextAsync(Uri documentUri, params (LspRange Range, string Text)[] changes) + internal async Task ReplaceTextAsync(Uri documentUri, params (LspRange Range, string Text)[] changes) { var didChangeParams = CreateDidChangeTextDocumentParams( documentUri, From be5f7352e289285cb02036f1e86fe778d5fd2d8f Mon Sep 17 00:00:00 2001 From: David Wengier Date: Tue, 30 Jul 2024 14:10:57 +1000 Subject: [PATCH 12/20] Fix issues with ContainedLanguage being dependent on VS types --- .../InternalAPI.Unshipped.txt | 1 + .../VisualStudioTextChange.cs | 23 +++++++++----- .../RazorCustomMessageTarget_Completion.cs | 31 +++++++++++++++++-- 3 files changed, 45 insertions(+), 10 deletions(-) diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServer.ContainedLanguage/InternalAPI.Unshipped.txt b/src/Razor/src/Microsoft.VisualStudio.LanguageServer.ContainedLanguage/InternalAPI.Unshipped.txt index 36eda715446..dee1afd5aa3 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServer.ContainedLanguage/InternalAPI.Unshipped.txt +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServer.ContainedLanguage/InternalAPI.Unshipped.txt @@ -4,6 +4,7 @@ Microsoft.VisualStudio.LanguageServer.ContainedLanguage.DefaultLSPDocumentSynchr Microsoft.VisualStudio.LanguageServer.ContainedLanguage.DefaultLSPRequestInvoker.DefaultLSPRequestInvoker(Microsoft.VisualStudio.LanguageServer.Client.ILanguageServiceBroker2! languageServiceBroker) -> void Microsoft.VisualStudio.LanguageServer.ContainedLanguage.LSPDocumentSnapshot.TryGetAllVirtualDocumentsAsArray(out System.Collections.Immutable.ImmutableArray virtualDocuments) -> bool Microsoft.VisualStudio.LanguageServer.ContainedLanguage.MessageInterception.DefaultInterceptorManager.DefaultInterceptorManager(System.Collections.Generic.IEnumerable!>! lazyInterceptors, System.Collections.Generic.IEnumerable!>! lazyGenericInterceptors) -> void +Microsoft.VisualStudio.LanguageServer.ContainedLanguage.VisualStudioTextChange.VisualStudioTextChange(int startLineNumber, int startCharacter, int endLineNumber, int endCharacter, Microsoft.VisualStudio.Text.ITextSnapshot! textSnapshot, string! newText) -> void override Microsoft.VisualStudio.LanguageServer.ContainedLanguage.DefaultLSPDocument.SetVirtualDocuments(System.Collections.Generic.IReadOnlyList! virtualDocuments) -> void override Microsoft.VisualStudio.LanguageServer.ContainedLanguage.DefaultLSPDocument.UpdateVirtualDocument(TVirtualDocument! virtualDocument, System.Collections.Generic.IReadOnlyList! changes, int hostDocumentVersion, object? state) -> Microsoft.VisualStudio.LanguageServer.ContainedLanguage.LSPDocumentSnapshot! override Microsoft.VisualStudio.LanguageServer.ContainedLanguage.DefaultLSPDocumentFactory.TryRefreshVirtualDocuments(Microsoft.VisualStudio.LanguageServer.ContainedLanguage.LSPDocument! document) -> bool diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServer.ContainedLanguage/VisualStudioTextChange.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServer.ContainedLanguage/VisualStudioTextChange.cs index 83571783783..ba7e1931154 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServer.ContainedLanguage/VisualStudioTextChange.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServer.ContainedLanguage/VisualStudioTextChange.cs @@ -16,16 +16,25 @@ public VisualStudioTextChange(int oldStart, int oldLength, string newText) } public VisualStudioTextChange(TextEdit textEdit, ITextSnapshot textSnapshot) + : this( + textEdit.Range.Start.Line, + textEdit.Range.Start.Character, + textEdit.Range.End.Line, + textEdit.Range.End.Character, + textSnapshot, + textEdit.NewText) { - var startRange = textEdit.Range.Start; - var startLine = textSnapshot.GetLineFromLineNumber(startRange.Line); - var startAbsoluteIndex = startLine.Start + startRange.Character; - var endRange = textEdit.Range.End; - var endLine = textSnapshot.GetLineFromLineNumber(endRange.Line); - var endAbsoluteIndex = endLine.Start + endRange.Character; + } + + public VisualStudioTextChange(int startLineNumber, int startCharacter, int endLineNumber, int endCharacter, ITextSnapshot textSnapshot, string newText) + { + var startLine = textSnapshot.GetLineFromLineNumber(startLineNumber); + var startAbsoluteIndex = startLine.Start + startCharacter; + var endLine = textSnapshot.GetLineFromLineNumber(endLineNumber); + var endAbsoluteIndex = endLine.Start + endCharacter; var length = endAbsoluteIndex - startAbsoluteIndex; OldSpan = new Span(startAbsoluteIndex, length); - NewText = textEdit.NewText; + NewText = newText; } public Span OldSpan { get; } diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_Completion.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_Completion.cs index 168ea5cf15c..51cf32b9b0f 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_Completion.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Endpoints/RazorCustomMessageTarget_Completion.cs @@ -7,6 +7,7 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.PooledObjects; +using Microsoft.AspNetCore.Razor.Threading; using Microsoft.CodeAnalysis.Razor.Protocol; using Microsoft.CodeAnalysis.Razor.Protocol.Completion; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; @@ -108,7 +109,13 @@ internal partial class RazorCustomMessageTarget { await _joinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); - var provisionalChange = new VisualStudioTextChange(provisionalTextEdit, virtualDocumentSnapshot.Snapshot); + var provisionalChange = new VisualStudioTextChange( + provisionalTextEdit.Range.Start.Line, + provisionalTextEdit.Range.Start.Character, + provisionalTextEdit.Range.End.Line, + provisionalTextEdit.Range.End.Character, + virtualDocumentSnapshot.Snapshot, + provisionalTextEdit.NewText); UpdateVirtualDocument(provisionalChange, request.ProjectedKind, request.Identifier.Version, hostDocumentUri, virtualDocumentSnapshot.Uri); // We want the delegation to continue on the captured context because we're currently on the `main` thread and we need to get back to the @@ -163,7 +170,13 @@ internal partial class RazorCustomMessageTarget if (provisionalTextEdit is not null) { var revertedProvisionalTextEdit = BuildRevertedEdit(provisionalTextEdit); - var revertedProvisionalChange = new VisualStudioTextChange(revertedProvisionalTextEdit, virtualDocumentSnapshot.Snapshot); + var revertedProvisionalChange = new VisualStudioTextChange( + revertedProvisionalTextEdit.Range.Start.Line, + revertedProvisionalTextEdit.Range.Start.Character, + revertedProvisionalTextEdit.Range.End.Line, + revertedProvisionalTextEdit.Range.End.Character, + virtualDocumentSnapshot.Snapshot, + revertedProvisionalTextEdit.NewText); UpdateVirtualDocument(revertedProvisionalChange, request.ProjectedKind, request.Identifier.Version, hostDocumentUri, virtualDocumentSnapshot.Uri); } } @@ -312,7 +325,19 @@ private void UpdateVirtualDocument( public Task GetFormattingOptionsAsync(TextDocumentIdentifierAndVersion document, CancellationToken _) { var formattingOptions = _formattingOptionsProvider.GetOptions(document.TextDocumentIdentifier.Uri); - return Task.FromResult(formattingOptions); + + if (formattingOptions is null) + { + return SpecializedTasks.Null(); + } + + var roslynFormattingOptions = new FormattingOptions() + { + TabSize = formattingOptions.TabSize, + InsertSpaces = formattingOptions.InsertSpaces, + OtherOptions = formattingOptions.OtherOptions, + }; + return Task.FromResult(roslynFormattingOptions); } private void AddSnippetCompletions(DelegatedCompletionParams request, ref PooledArrayBuilder builder) From a21fd27e2e7b74ae205a0387186d057cc7326325 Mon Sep 17 00:00:00 2001 From: David Wengier Date: Tue, 30 Jul 2024 14:11:08 +1000 Subject: [PATCH 13/20] Roslyn types are immutable --- .../Diagnostics/DocumentPullDiagnosticsEndpoint.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/DocumentPullDiagnosticsEndpoint.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/DocumentPullDiagnosticsEndpoint.cs index 79c3464a9b9..8bb28230e3a 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/DocumentPullDiagnosticsEndpoint.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Diagnostics/DocumentPullDiagnosticsEndpoint.cs @@ -42,8 +42,10 @@ public DocumentPullDiagnosticsEndpoint( public void ApplyCapabilities(VSInternalServerCapabilities serverCapabilities, VSInternalClientCapabilities clientCapabilities) { serverCapabilities.SupportsDiagnosticRequests = true; - serverCapabilities.DiagnosticProvider ??= new(); - serverCapabilities.DiagnosticProvider.DiagnosticKinds = [VSInternalDiagnosticKind.Syntax]; + serverCapabilities.DiagnosticProvider ??= new() + { + DiagnosticKinds = [VSInternalDiagnosticKind.Syntax] + }; } public TextDocumentIdentifier GetTextDocumentIdentifier(VSInternalDocumentDiagnosticsParams request) From 8725bba9501d86b9f84b12a8e1994c28ba323274 Mon Sep 17 00:00:00 2001 From: David Wengier Date: Tue, 30 Jul 2024 14:11:28 +1000 Subject: [PATCH 14/20] Cohost signature help now only has to return a single type --- .../Cohost/CohostSignatureHelpEndpoint.cs | 25 +++++-------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostSignatureHelpEndpoint.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostSignatureHelpEndpoint.cs index 1015b78c820..c5357ed5bb4 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostSignatureHelpEndpoint.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostSignatureHelpEndpoint.cs @@ -16,9 +16,6 @@ using Microsoft.VisualStudio.Razor.LanguageClient.Cohost; using Microsoft.VisualStudio.Razor.LanguageClient.Extensions; using Microsoft.VisualStudio.Razor.Settings; -using static Roslyn.LanguageServer.Protocol.LspExtensions; -using LspFactory = Roslyn.LanguageServer.Protocol.LspFactory; -using RoslynSignatureHelp = Roslyn.LanguageServer.Protocol.SignatureHelp; namespace Microsoft.VisualStudio.LanguageServices.Razor.LanguageClient.Cohost; @@ -35,7 +32,7 @@ internal class CohostSignatureHelpEndpoint( IHtmlDocumentSynchronizer htmlDocumentSynchronizer, LSPRequestInvoker requestInvoker, ILoggerFactory loggerFactory) - : AbstractRazorCohostDocumentRequestHandler?>, IDynamicRegistrationProvider + : AbstractRazorCohostDocumentRequestHandler, IDynamicRegistrationProvider { private readonly IRemoteServiceInvoker _remoteServiceInvoker = remoteServiceInvoker; private readonly IClientSettingsManager _clientSettingsManager = clientSettingsManager; @@ -70,10 +67,10 @@ internal class CohostSignatureHelpEndpoint( // NOTE: The use of SumType here is a little odd, but it allows us to return Roslyn LSP types from the Roslyn call, and VS LSP types from the Html // call. It works because both sets of types are attributed the right way, so the Json ends up looking the same and the client doesn't // care. Ideally eventually we will be able to move all of this to just Roslyn LSP types, but we might have to wait for Web Tools - protected override Task?> HandleRequestAsync(SignatureHelpParams request, RazorCohostRequestContext context, CancellationToken cancellationToken) + protected override Task HandleRequestAsync(SignatureHelpParams request, RazorCohostRequestContext context, CancellationToken cancellationToken) => HandleRequestAsync(request, context.TextDocument.AssumeNotNull(), cancellationToken); - private async Task?> HandleRequestAsync(SignatureHelpParams request, TextDocument razorDocument, CancellationToken cancellationToken) + private async Task HandleRequestAsync(SignatureHelpParams request, TextDocument razorDocument, CancellationToken cancellationToken) { // Return nothing if "Parameter Information" option is disabled unless signature help is invoked explicitly via command as opposed to typing or content change if (request.Context is { TriggerKind: not SignatureHelpTriggerKind.Invoked } && @@ -82,10 +79,10 @@ internal class CohostSignatureHelpEndpoint( return null; } - var data = await _remoteServiceInvoker.TryInvokeAsync( + var data = await _remoteServiceInvoker.TryInvokeAsync( razorDocument.Project.Solution, (service, solutionInfo, cancellationToken) => - service.GetSignatureHelpAsync(solutionInfo, razorDocument.Id, LspFactory.CreatePosition(request.Position.ToLinePosition()), cancellationToken), + service.GetSignatureHelpAsync(solutionInfo, razorDocument.Id, request.Position, cancellationToken), cancellationToken) .ConfigureAwait(false); @@ -130,17 +127,7 @@ internal readonly struct TestAccessor(CohostSignatureHelpEndpoint instance) return null; } - if (signatureHelp.TryGetFirst(out var sigHelp1)) - { - return sigHelp1.Signatures.Select(s => s.Label).ToArray(); - } - else if (signatureHelp.TryGetSecond(out var sigHelp2)) - { - return sigHelp2.Signatures.Select(s => s.Label).ToArray(); - } - - Assumed.Unreachable(); - return null; + return signatureHelp.Signatures.Select(s => s.Label).ToArray(); } } } From bd720ba804f2a7958d233df50e229b9afb1dcf82 Mon Sep 17 00:00:00 2001 From: David Wengier Date: Tue, 30 Jul 2024 14:11:47 +1000 Subject: [PATCH 15/20] Project file tweaks --- .../Microsoft.CodeAnalysis.Remote.Razor.CoreComponents.csproj | 2 -- .../Microsoft.AspNetCore.Razor.LanguageServer.Test.csproj | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor.CoreComponents/Microsoft.CodeAnalysis.Remote.Razor.CoreComponents.csproj b/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor.CoreComponents/Microsoft.CodeAnalysis.Remote.Razor.CoreComponents.csproj index 6422f8cc5b6..1f4c0f6ef87 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor.CoreComponents/Microsoft.CodeAnalysis.Remote.Razor.CoreComponents.csproj +++ b/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor.CoreComponents/Microsoft.CodeAnalysis.Remote.Razor.CoreComponents.csproj @@ -30,8 +30,6 @@ <_PublishedFiles Include="$(PublishDir)**\Microsoft.AspNetCore.*" /> <_PublishedFiles Include="$(PublishDir)**\Microsoft.Extensions.ObjectPool.dll" /> - <_PublishedFiles Include="$(PublishDir)**\Microsoft.VisualStudio.LanguageServer.Protocol.*" /> - <_PublishedFiles Remove="@(_PublishedFiles)" Condition="'%(Extension)' == '.pdb'" /> <_PublishedFiles Remove="@(_PublishedFiles)" Condition="'%(Extension)' == '.xml'" /> diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Microsoft.AspNetCore.Razor.LanguageServer.Test.csproj b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Microsoft.AspNetCore.Razor.LanguageServer.Test.csproj index aecc781879e..abc3fd8035e 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Microsoft.AspNetCore.Razor.LanguageServer.Test.csproj +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Microsoft.AspNetCore.Razor.LanguageServer.Test.csproj @@ -38,6 +38,10 @@ + + + +