3 implementations of ILspServices
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
LspServices\LspServices.cs (1)
18internal sealed class LspServices : ILspServices, IMethodHandlerProvider
Microsoft.CommonLanguageServerProtocol.Framework.Example (1)
ExampleLspServices.cs (1)
12internal sealed class ExampleLspServices : ILspServices
Microsoft.CommonLanguageServerProtocol.Framework.UnitTests (1)
Mocks\TestLspServices.cs (1)
13internal abstract class TestLspServices(IEnumerable<(Type type, object instance)> services) : ILspServices
67 references to ILspServices
Microsoft.CodeAnalysis.LanguageServer (3)
FileBasedPrograms\FileBasedProgramsProjectSystem.cs (2)
25private readonly ILspServices _lspServices; 31ILspServices lspServices,
FileBasedPrograms\FileBasedProgramsWorkspaceProviderFactory.cs (1)
39public ILspMiscellaneousFilesWorkspaceProvider CreateLspMiscellaneousFilesWorkspaceProvider(ILspServices lspServices, HostServices hostServices)
Microsoft.CodeAnalysis.LanguageServer.Protocol (46)
Handler\RequestContext.cs (3)
47private readonly ILspServices _lspServices; 176ILspServices lspServices, 230ILspServices lspServices,
Handler\RequestContextFactory.cs (2)
15private readonly ILspServices _lspServices; 17public RequestContextFactory(ILspServices lspServices)
Handler\WorkspaceCommand\ExecuteWorkspaceCommandHandler.cs (2)
33var lspServices = context.GetRequiredService<ILspServices>();
LspServices\BaseService.cs (6)
16public abstract object GetInstance(ILspServices lspServices); 22public static BaseService CreateLazily<T>(Func<ILspServices, T> creator) 30public override object GetInstance(ILspServices lspServices) => instance; 33private sealed class LazyService<T>(Func<ILspServices, T> creator) : BaseService 37private readonly Func<ILspServices, T> _creator = creator; 42public override object GetInstance(ILspServices lspServices)
LspServices\LspServices.cs (2)
104if (typeof(T) == typeof(ILspServices)) 132if (typeName == typeof(ILspServices).FullName)
LspServices\TelemetryService.cs (1)
14public TelemetryService(ILspServices lspServices)
RoslynLanguageServer.cs (2)
57protected override ILspServices ConstructLspServices() 118void AddLazyService<T>(Func<ILspServices, T> creator)
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\AbstractLanguageServer.cs (9)
30private readonly Lazy<ILspServices> _lspServices; 73_lspServices = new Lazy<ILspServices>(() => ConstructLspServices()); 77var lspServices = _lspServices.Value; 94/// Extension point to allow creation of <see cref="ILspServices"/> since that can't always be handled in the constructor. 96/// <returns>An <see cref="ILspServices"/> instance for this server.</returns> 98protected abstract ILspServices ConstructLspServices(); 108public ILspServices GetLspServices() => _lspServices.Value; 210ILspServices lspServices, 301var lspServices = GetLspServices();
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\AbstractRequestContextFactory.cs (1)
20/// It also allows somewhere to pass things like the <see cref="ILspServices" /> or <see cref="ILspLogger" /> which are useful on a wide variety of requests.
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\HandlerProvider.cs (4)
17internal sealed class HandlerProvider(ILspServices lspServices, AbstractTypeRefResolver typeRefResolver) : AbstractHandlerProvider 19private readonly ILspServices _lspServices = lspServices; 48private static FrozenDictionary<RequestHandlerMetadata, Lazy<IMethodHandler>> CreateMethodToHandlerMap(ILspServices lspServices, AbstractTypeRefResolver typeRefResolver) 103static Lazy<IMethodHandler> GetLazyHandlerFromTypeRef(ILspServices lspServices, AbstractTypeRefResolver typeRefResolver, TypeRef handlerTypeRef)
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\IMethodHandlerProvider.cs (1)
13/// Optional interface that can be implemented by <see cref="ILspServices"/> implementations
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\IQueueItem.cs (1)
49ILspServices LspServices { get; }
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\IRequestExecutionQueue.cs (1)
24Task<object?> ExecuteAsync(object? serializedRequest, string methodName, ILspServices lspServices, CancellationToken cancellationToken);
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\NewtonsoftLanguageServer.cs (1)
77var lspServices = target.GetLspServices();
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\QueueItem.cs (3)
42public ILspServices LspServices { get; } 51ILspServices lspServices, 72ILspServices lspServices,
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\RequestExecutionQueue.cs (3)
42/// <see cref="ExecuteAsync(object?, string, Microsoft.CommonLanguageServerProtocol.Framework.ILspServices, CancellationToken)"/> 159ILspServices lspServices, 192ILspServices? lspServices = null;
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\SystemTextJsonLanguageServer.cs (1)
85var lspServices = target.GetLspServices();
Workspaces\ILspMiscellaneousFilesWorkspaceProviderFactory.cs (1)
12ILspMiscellaneousFilesWorkspaceProvider CreateLspMiscellaneousFilesWorkspaceProvider(ILspServices lspServices, HostServices hostServices);
Workspaces\LspMiscellaneousFilesWorkspaceProvider.cs (1)
28internal sealed class LspMiscellaneousFilesWorkspaceProvider(ILspServices lspServices, HostServices hostServices)
Workspaces\LspMiscellaneousFilesWorkspaceProviderFactory.cs (1)
25public ILspMiscellaneousFilesWorkspaceProvider CreateLspMiscellaneousFilesWorkspaceProvider(ILspServices lspServices, HostServices hostServices)
Microsoft.CommonLanguageServerProtocol.Framework.Example (6)
ExampleLanguageServer.cs (1)
25protected override ILspServices ConstructLspServices()
ExampleLspServices.cs (1)
18_ = serviceCollection.AddSingleton<ILspServices>(this);
ExampleRequestContext.cs (2)
9public ILspServices LspServices; 12public ExampleRequestContext(ILspServices lspServices, ILspLogger logger)
ExampleRequestContextFactory.cs (2)
12private readonly ILspServices _lspServices; 14public ExampleRequestContextFactory(ILspServices lspServices)
Microsoft.CommonLanguageServerProtocol.Framework.UnitTests (12)
HandlerProviderTests.cs (1)
98private static ILspServices GetLspServices(bool supportsMethodHandlerProvider)
Mocks\TestLspServices.cs (1)
17public static ILspServices Create(IEnumerable<(Type type, object instance)> services, bool supportsMethodHandlerProvider)
RequestExecutionQueueTests.cs (9)
25protected override ILspServices ConstructLspServices() 43private static ILspServices GetLspServices() 53var lspServices = GetLspServices(); 72var lspServices = GetLspServices(); 103var lspServices = GetLspServices(); 113var lspServices = GetLspServices(); 123var lspServices = GetLspServices(); 133var lspServices = GetLspServices(); 144var lspServices = GetLspServices();
TestExampleLanguageServer.cs (1)
79protected override ILspServices ConstructLspServices()