Skip to content

Commit

Permalink
Merge pull request #73040 from davidwengier/CleanupRazorEA
Browse files Browse the repository at this point in the history
Clean up Razor EA
  • Loading branch information
davidwengier authored May 30, 2024
2 parents 2821506 + 3b9b545 commit 7185315
Show file tree
Hide file tree
Showing 21 changed files with 9 additions and 705 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@ generated_code = true

# The above configurations don't apply to compiler warnings. Requiring all params to be documented
# is not something we require for this project, so suppressing it directly here.
dotnet_diagnostic.CS1573.severity = none
dotnet_diagnostic.CS1573.severity = none

# As above, we need to specifically disable compiler warnings that we don't want to break downstream
# builds
dotnet_diagnostic.IDE0005.severity = none
4 changes: 0 additions & 4 deletions src/LanguageServer/Protocol/WellKnownLspServerKinds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public static string ToUserVisibleString(this WellKnownLspServerKinds server)
{
return server switch
{
WellKnownLspServerKinds.RazorCohostServer => "Razor Cohost Language Server Client",
WellKnownLspServerKinds.RazorLspServer => "Razor C# Language Server Client",
WellKnownLspServerKinds.LiveShareLspServer => "Live Share C#/Visual Basic Language Server Client",
WellKnownLspServerKinds.AlwaysActiveVSLspServer => "Roslyn Language Server Client",
Expand All @@ -75,8 +74,6 @@ public static string ToTelemetryString(this WellKnownLspServerKinds server)
{
return server switch
{
WellKnownLspServerKinds.RazorCohostServer => "RazorCohostLanguageClient",

// Telemetry was previously reported as RazorInProcLanguageClient.GetType().Name
WellKnownLspServerKinds.RazorLspServer => "RazorInProcLanguageClient",

Expand Down Expand Up @@ -104,7 +101,6 @@ public static string GetContractName(this WellKnownLspServerKinds server)
{
return server switch
{
WellKnownLspServerKinds.RazorCohostServer => ProtocolConstants.RazorCohostContract,
WellKnownLspServerKinds.RazorLspServer => ProtocolConstants.RoslynLspLanguagesContract,
WellKnownLspServerKinds.LiveShareLspServer => ProtocolConstants.RoslynLspLanguagesContract,
WellKnownLspServerKinds.AlwaysActiveVSLspServer => ProtocolConstants.RoslynLspLanguagesContract,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace Microsoft.CodeAnalysis.ExternalAccess.Razor.Cohost;

/// <summary>
/// Base class for services that need to live in Razor but be exported using <see cref="ExportRazorStatelessLspServiceAttribute"/>
/// Base class for services that need to live in Razor but cannot be exported using <see cref="ExportCohostStatelessLspServiceAttribute"/>
/// since those services must implement <see cref="ILspService"/> but the Razor code doesn't have IVT to it.
/// </summary>
internal abstract class AbstractRazorLspService : ILspService
Expand Down
7 changes: 0 additions & 7 deletions src/Tools/ExternalAccess/Razor/Cohost/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// See the LICENSE file in the project root for more information.

using System;
using System.Collections.Immutable;
using Microsoft.CodeAnalysis.LanguageServer;

namespace Microsoft.CodeAnalysis.ExternalAccess.Razor.Cohost;
Expand All @@ -12,12 +11,6 @@ internal static class Constants
{
public const string RazorLanguageName = LanguageInfoProvider.RazorLanguageName;

public const string RazorLSPContentType = "Razor";

public const string RazorLanguageContract = ProtocolConstants.RazorCohostContract;

public static readonly ImmutableArray<string> RazorLanguage = ImmutableArray.Create("Razor");

// The UI context is provided by Razor, so this guid must match the one in https://github.com/dotnet/razor/blob/main/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/RazorConstants.cs
public static readonly Guid RazorCohostingUIContext = new Guid("6d5b86dc-6b8a-483b-ae30-098a3c7d6774");
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;

namespace Microsoft.CodeAnalysis.ExternalAccess.Razor.Cohost;

[Obsolete("This should no longer be used")]
internal interface IRazorCustomMessageTarget
{
}

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 7185315

Please sign in to comment.