dotnet / razor

Compiler and tooling experience for Razor ASP.NET Core apps in Visual Studio, Visual Studio for Mac, and VS Code.
https://asp.net
MIT License
506 stars 196 forks source link

Move named pipe support #11206

Closed DustinCampbell closed 1 week ago

DustinCampbell commented 1 week ago

Since the named pipe support is intended to only be used by RZLS, this change moves the support types into MS.ANC.Razor.LanguageServer and organizes them in a MS.ANC.Razor.LanguageServer.Hosting.NamedPipes namespace. In addition, I've moved a couple of IServiceCollection extension methods into the MS.ANC.Razor.LanguageServer.Hosting namespace to avoid opening up internals visible to access to the entire MS.ANC.Razor.LanguageServer.Extension namespace, even if it's just to RZLS. The goal of having RestrictedInternalsVisibleTo for the MS.ANC.Razor.LanguageServer.Hosting namespace is to control the exposed surface area of the language server. If something is needed by VS or RZLS, strongly consider whether it should just be added to the Hosting namespace to avoid unintentionally dependencies that might need to be detangled later.

Note: Once this is merged, I'll submit a PR to update the code pointer comment at https://github.com/dotnet/vscode-csharp/blob/eb38986a52a8be7221d0e466f7a25c98dcbd7825/src/razor/src/razorLanguageServerClient.ts#L228.

DustinCampbell commented 1 week ago

Thanks!