1 instantiation of TestRequestContext
Microsoft.CommonLanguageServerProtocol.Framework.UnitTests (1)
Mocks\TestRequestContext.cs (1)
17
=> Task.FromResult(new
TestRequestContext
());
31 references to TestRequestContext
Microsoft.CommonLanguageServerProtocol.Framework.UnitTests (31)
Mocks\TestMethodHandlers.cs (22)
16
internal class TestMethodHandler : IRequestHandler<MockRequest, MockResponse,
TestRequestContext
>
26
public Task<MockResponse> HandleRequestAsync(MockRequest request,
TestRequestContext
context, CancellationToken cancellationToken)
31
internal class TestParameterlessMethodHandler : IRequestHandler<MockResponse,
TestRequestContext
>
41
public Task<MockResponse> HandleRequestAsync(
TestRequestContext
context, CancellationToken cancellationToken)
46
internal class TestNotificationHandler : INotificationHandler<MockRequest,
TestRequestContext
>
55
public Task HandleNotificationAsync(MockRequest request,
TestRequestContext
context, CancellationToken cancellationToken)
60
internal class TestParameterlessNotificationHandler : INotificationHandler<
TestRequestContext
>
68
public Task HandleNotificationAsync(
TestRequestContext
context, CancellationToken cancellationToken)
72
internal class TestMethodHandlerWithoutAttribute : INotificationHandler<
TestRequestContext
>
76
public Task HandleNotificationAsync(
TestRequestContext
requestContext, CancellationToken cancellationToken)
83
internal class MutatingHandler : IRequestHandler<MockRequest, MockResponse,
TestRequestContext
>
96
public Task<MockResponse> HandleRequestAsync(MockRequest request,
TestRequestContext
context, CancellationToken cancellationToken)
103
internal class CompletingHandler : IRequestHandler<MockRequest, MockResponse,
TestRequestContext
>
111
public async Task<MockResponse> HandleRequestAsync(MockRequest request,
TestRequestContext
context, CancellationToken cancellationToken)
125
internal class CancellingHandler : IRequestHandler<MockRequest, MockResponse,
TestRequestContext
>
133
public async Task<MockResponse> HandleRequestAsync(MockRequest request,
TestRequestContext
context, CancellationToken cancellationToken)
144
internal class ThrowingHandler : IRequestHandler<MockRequest, MockResponse,
TestRequestContext
>
152
public Task<MockResponse> HandleRequestAsync(MockRequest request,
TestRequestContext
context, CancellationToken cancellationToken)
159
internal class TestDefaultLanguageHandler : IRequestHandler<MockRequest, MockResponse,
TestRequestContext
>
169
public Task<MockResponse> HandleRequestAsync(MockRequest request,
TestRequestContext
context, CancellationToken cancellationToken)
174
internal class TestXamlLanguageHandler : IRequestHandler<MockRequest, MockResponse,
TestRequestContext
>
185
public Task<MockResponse> HandleRequestAsync(MockRequest request,
TestRequestContext
context, CancellationToken cancellationToken)
Mocks\TestRequestContext.cs (3)
12
internal class Factory : AbstractRequestContextFactory<
TestRequestContext
>
16
public override Task<
TestRequestContext
> CreateRequestContextAsync<TRequestParam>(IQueueItem<
TestRequestContext
> queueItem, IMethodHandler methodHandler, TRequestParam requestParam, CancellationToken cancellationToken)
RequestExecutionQueueTests.cs (6)
18
private class MockServer : NewtonsoftLanguageServer<
TestRequestContext
>
30
private static RequestExecutionQueue<
TestRequestContext
> GetRequestExecutionQueue(
44
services: new[] { (typeof(AbstractRequestContextFactory<
TestRequestContext
>), (object)
TestRequestContext
.Factory.Instance) },
154
private class TestRequestExecutionQueue : RequestExecutionQueue<
TestRequestContext
>
158
public TestRequestExecutionQueue(AbstractLanguageServer<
TestRequestContext
> languageServer, ILspLogger logger, AbstractHandlerProvider handlerProvider, bool cancelInProgressWorkUponMutatingRequest)