2 instantiations of RequestContext
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Handler\RequestContext.cs (2)
252
context = new
RequestContext
(
283
context = new
RequestContext
(
127 references to RequestContext
Microsoft.CodeAnalysis.ExternalAccess.Razor (3)
Cohost\RazorCohostRequestContext.cs (3)
15
/// <inheritdoc cref="
RequestContext
.Workspace"/>
17
/// <inheritdoc cref="
RequestContext
.Solution"/>
19
/// <inheritdoc cref="
RequestContext
.Document"/>
Microsoft.CodeAnalysis.LanguageServer.Protocol (124)
CSharpVisualBasicLanguageServerFactory.cs (1)
29
public AbstractLanguageServer<
RequestContext
> Create(
Extensions\ProtocolConversions.cs (1)
454
RequestContext
? context,
ExternalAccess\Razor\FormatNewFileHandler.cs (1)
39
public async Task<string?> HandleRequestAsync(FormatNewFileParams request,
RequestContext
context, CancellationToken cancellationToken)
ExternalAccess\Razor\SemanticTokensRangesHandler.cs (1)
42
RequestContext
context,
ExternalAccess\Razor\SimplifyMethodHandler.cs (1)
38
RequestContext
context,
Features\EditAndContinue\EditAndContinueDiagnosticSource_OpenDocument.cs (1)
24
public override async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(
RequestContext
context, CancellationToken cancellationToken)
Features\EditAndContinue\EditAndContinueDiagnosticSource_Workspace.cs (2)
25
public override Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(
RequestContext
context, CancellationToken cancellationToken)
34
public override Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(
RequestContext
context, CancellationToken cancellationToken)
Handler\AbstractRefreshQueue.cs (1)
52
public Task OnInitializedAsync(ClientCapabilities clientCapabilities,
RequestContext
context, CancellationToken cancellationToken)
Handler\Breakpoints\ValidateBreakableRangeHandler.cs (1)
35
public async Task<LSP.Range?> HandleRequestAsync(LSP.VSInternalValidateBreakableRangeParams request,
RequestContext
context, CancellationToken cancellationToken)
Handler\CodeActions\CodeActionFixAllResolveHandler.cs (1)
40
public async Task<RoslynFixAllCodeAction> HandleRequestAsync(RoslynFixAllCodeAction request,
RequestContext
context, CancellationToken cancellationToken)
Handler\CodeActions\CodeActionResolveHandler.cs (1)
56
public async Task<LSP.CodeAction> HandleRequestAsync(LSP.CodeAction codeAction,
RequestContext
context, CancellationToken cancellationToken)
Handler\CodeActions\CodeActionResolveHelper.cs (1)
23
public static Task<LSP.WorkspaceEdit> GetCodeActionResolveEditsAsync(
RequestContext
context, CodeActionResolveData data, ImmutableArray<CodeActionOperation> operations, CancellationToken cancellationToken)
Handler\CodeActions\CodeActionsHandler.cs (1)
54
public async Task<LSP.CodeAction[]> HandleRequestAsync(LSP.CodeActionParams request,
RequestContext
context, CancellationToken cancellationToken)
Handler\CodeLens\CodeLensHandler.cs (1)
45
public async Task<LSP.CodeLens[]?> HandleRequestAsync(LSP.CodeLensParams request,
RequestContext
context, CancellationToken cancellationToken)
Handler\CodeLens\CodeLensResolveHandler.cs (1)
37
public async Task<LSP.CodeLens> HandleRequestAsync(LSP.CodeLens request,
RequestContext
context, CancellationToken cancellationToken)
Handler\Commands\AbstractExecuteWorkspaceCommandHandler.cs (1)
20
public abstract Task<object> HandleRequestAsync(ExecuteCommandParams request,
RequestContext
context, CancellationToken cancellationToken);
Handler\Completion\CompletionHandler.cs (1)
48
LSP.CompletionParams request,
RequestContext
context, CancellationToken cancellationToken)
Handler\Completion\CompletionResolveHandler.cs (1)
47
public Task<LSP.CompletionItem> HandleRequestAsync(LSP.CompletionItem completionItem,
RequestContext
context, CancellationToken cancellationToken)
Handler\Configuration\DidChangeConfigurationNotificationHandler.cs (1)
66
public Task HandleNotificationAsync(DidChangeConfigurationParams request,
RequestContext
requestContext, CancellationToken cancellationToken)
Handler\Configuration\DidChangeConfigurationNotificationHandler_OnInitialized.cs (1)
14
public async Task OnInitializedAsync(ClientCapabilities clientCapabilities,
RequestContext
context, CancellationToken cancellationToken)
Handler\Definitions\AbstractGoToDefinitionHandler.cs (2)
36
public abstract Task<LSP.Location[]?> HandleRequestAsync(TextDocumentPositionParams request,
RequestContext
context, CancellationToken cancellationToken);
38
protected Task<LSP.Location[]?> GetDefinitionAsync(LSP.TextDocumentPositionParams request, bool forSymbolType,
RequestContext
context, CancellationToken cancellationToken)
Handler\Definitions\GoToDefinitionHandler.cs (1)
27
public override Task<LSP.Location[]?> HandleRequestAsync(LSP.TextDocumentPositionParams request,
RequestContext
context, CancellationToken cancellationToken)
Handler\Definitions\GoToTypeDefinitionHandler.cs (1)
27
public override Task<LSP.Location[]?> HandleRequestAsync(LSP.TextDocumentPositionParams request,
RequestContext
context, CancellationToken cancellationToken)
Handler\Diagnostics\AbstractDocumentPullDiagnosticHandler.cs (1)
31
protected override ValueTask<ImmutableArray<IDiagnosticSource>> GetOrderedDiagnosticSourcesAsync(TDiagnosticsParams diagnosticsParams, string? requestDiagnosticCategory,
RequestContext
context, CancellationToken cancellationToken)
Handler\Diagnostics\AbstractPullDiagnosticHandler.cs (4)
73
TDiagnosticsParams diagnosticsParams, string? requestDiagnosticCategory,
RequestContext
context, CancellationToken cancellationToken);
100
protected virtual Task WaitForChangesAsync(string? category,
RequestContext
context, CancellationToken cancellationToken)
106
TDiagnosticsParams diagnosticsParams,
RequestContext
context, CancellationToken cancellationToken)
300
private void HandleRemovedDocuments(
RequestContext
context, HashSet<PreviousPullResult> removedPreviousResults, BufferedProgress<TReport> progress)
Handler\Diagnostics\AbstractWorkspacePullDiagnosticsHandler.cs (2)
59
protected override ValueTask<ImmutableArray<IDiagnosticSource>> GetOrderedDiagnosticSourcesAsync(TDiagnosticsParams diagnosticsParams, string? requestDiagnosticCategory,
RequestContext
context, CancellationToken cancellationToken)
94
protected override async Task WaitForChangesAsync(string? category,
RequestContext
context, CancellationToken cancellationToken)
Handler\Diagnostics\BuildOnlyDiagnosticIdsHandler.cs (1)
40
public Task<BuildOnlyDiagnosticIdsResult> HandleRequestAsync(
RequestContext
context, CancellationToken cancellationToken)
Handler\Diagnostics\DiagnosticSourceProviders\DiagnosticSourceManager.cs (4)
54
public ValueTask<ImmutableArray<IDiagnosticSource>> CreateDocumentDiagnosticSourcesAsync(
RequestContext
context, string? providerName, CancellationToken cancellationToken)
57
public ValueTask<ImmutableArray<IDiagnosticSource>> CreateWorkspaceDiagnosticSourcesAsync(
RequestContext
context, string? providerName, CancellationToken cancellationToken)
61
RequestContext
context,
152
public async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(
RequestContext
context, CancellationToken cancellationToken)
Handler\Diagnostics\DiagnosticSourceProviders\DocumentSyntaxAndSemanticDiagnosticSourceProvider.cs (1)
25
public ValueTask<ImmutableArray<IDiagnosticSource>> CreateDiagnosticSourcesAsync(
RequestContext
context, CancellationToken cancellationToken)
Handler\Diagnostics\DiagnosticSourceProviders\IDiagnosticSourceManager.cs (2)
34
ValueTask<ImmutableArray<IDiagnosticSource>> CreateDocumentDiagnosticSourcesAsync(
RequestContext
context, string? providerName, CancellationToken cancellationToken);
42
ValueTask<ImmutableArray<IDiagnosticSource>> CreateWorkspaceDiagnosticSourcesAsync(
RequestContext
context, string? providerName, CancellationToken cancellationToken);
Handler\Diagnostics\DiagnosticSourceProviders\IDiagnosticSourceProvider.cs (1)
34
ValueTask<ImmutableArray<IDiagnosticSource>> CreateDiagnosticSourcesAsync(
RequestContext
context, CancellationToken cancellationToken);
Handler\Diagnostics\DiagnosticSourceProviders\WorkspaceDiagnosticSourceHelpers.cs (1)
42
public static bool ShouldSkipDocument(
RequestContext
context, TextDocument document)
Handler\Diagnostics\DiagnosticSourceProviders\WorkspaceDocumentsAndProjectDiagnosticSourceProvider.cs (1)
52
public async ValueTask<ImmutableArray<IDiagnosticSource>> CreateDiagnosticSourcesAsync(
RequestContext
context, CancellationToken cancellationToken)
Handler\Diagnostics\DiagnosticSources\AbstractDocumentDiagnosticSource.cs (1)
21
RequestContext
context, CancellationToken cancellationToken);
Handler\Diagnostics\DiagnosticSources\AbstractProjectDiagnosticSource.cs (2)
26
public abstract Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(
RequestContext
context, CancellationToken cancellationToken);
46
RequestContext
context,
Handler\Diagnostics\DiagnosticSources\AbstractWorkspaceDocumentDiagnosticSource.cs (1)
41
RequestContext
context,
Handler\Diagnostics\DiagnosticSources\DocumentDiagnosticSource.cs (1)
25
RequestContext
context, CancellationToken cancellationToken)
Handler\Diagnostics\DiagnosticSources\IDiagnosticSource.cs (1)
35
RequestContext
context,
Handler\Diagnostics\DiagnosticSources\NonLocalDocumentDiagnosticSource.cs (1)
22
RequestContext
context,
Handler\Diagnostics\DiagnosticSources\TaskListDiagnosticSource.cs (1)
36
RequestContext
context, CancellationToken cancellationToken)
Handler\Diagnostics\DiagnosticsPullCache.cs (1)
18
internal record struct DiagnosticsRequestState(Project Project, int GlobalStateVersion,
RequestContext
Context, IDiagnosticSource DiagnosticSource);
Handler\Diagnostics\Public\PublicDocumentNonLocalDiagnosticSourceProvider.cs (1)
32
public ValueTask<ImmutableArray<IDiagnosticSource>> CreateDiagnosticSourcesAsync(
RequestContext
context, CancellationToken cancellationToken)
Handler\Diagnostics\Public\PublicDocumentPullDiagnosticsHandler_IOnInitialized.cs (1)
19
public async Task OnInitializedAsync(ClientCapabilities clientCapabilities,
RequestContext
context, CancellationToken cancellationToken)
Handler\DocumentChanges\DidChangeHandler.cs (1)
29
public Task<object?> HandleRequestAsync(DidChangeTextDocumentParams request,
RequestContext
context, CancellationToken cancellationToken)
Handler\DocumentChanges\DidCloseHandler.cs (1)
31
public async Task HandleNotificationAsync(LSP.DidCloseTextDocumentParams request,
RequestContext
context, CancellationToken cancellationToken)
Handler\DocumentChanges\DidOpenHandler.cs (1)
31
public async Task HandleNotificationAsync(LSP.DidOpenTextDocumentParams request,
RequestContext
context, CancellationToken cancellationToken)
Handler\EditAndContinue\DocumentEditAndContinueDiagnosticSourceProvider.cs (1)
26
public ValueTask<ImmutableArray<IDiagnosticSource>> CreateDiagnosticSourcesAsync(
RequestContext
context, CancellationToken cancellationToken)
Handler\EditAndContinue\RegisterSolutionSnapshotHandler.cs (1)
34
public Task<LspSolutionSnapshotId> HandleRequestAsync(
RequestContext
context, CancellationToken cancellationToken)
Handler\EditAndContinue\WorkspaceEditAndContinueDiagnosticSourceProvider.cs (1)
27
public ValueTask<ImmutableArray<IDiagnosticSource>> CreateDiagnosticSourcesAsync(
RequestContext
context, CancellationToken cancellationToken)
Handler\FoldingRanges\FoldingRangesHandler.cs (1)
39
public Task<FoldingRange[]?> HandleRequestAsync(FoldingRangeParams request,
RequestContext
context, CancellationToken cancellationToken)
Handler\Formatting\AbstractFormatDocumentHandlerBase.cs (2)
24
RequestContext
context,
51
public abstract Task<ResponseType> HandleRequestAsync(RequestType request,
RequestContext
context, CancellationToken cancellationToken);
Handler\Formatting\FormatDocumentHandler.cs (1)
24
RequestContext
context,
Handler\Formatting\FormatDocumentOnTypeHandler.cs (1)
40
RequestContext
context,
Handler\Formatting\FormatDocumentRangeHandler.cs (1)
24
RequestContext
context,
Handler\Highlights\DocumentHighlightHandler.cs (1)
43
public Task<DocumentHighlight[]?> HandleRequestAsync(TextDocumentPositionParams request,
RequestContext
context, CancellationToken cancellationToken)
Handler\Hover\HoverHandler.cs (1)
42
public Task<Hover?> HandleRequestAsync(TextDocumentPositionParams request,
RequestContext
context, CancellationToken cancellationToken)
Handler\ILspServiceNotificationHandler.cs (2)
11
INotificationHandler<
RequestContext
>,
18
INotificationHandler<TRequest,
RequestContext
>,
Handler\ILspServiceRequestHandler.cs (2)
15
IRequestHandler<TRequest, TResponse,
RequestContext
>,
25
IRequestHandler<TResponse,
RequestContext
>,
Handler\InlayHint\InlayHintHandler.cs (1)
41
public Task<LSP.InlayHint[]?> HandleRequestAsync(InlayHintParams request,
RequestContext
context, CancellationToken cancellationToken)
Handler\InlayHint\InlayHintResolveHandler.cs (1)
33
public Task<LSP.InlayHint> HandleRequestAsync(LSP.InlayHint request,
RequestContext
context, CancellationToken cancellationToken)
Handler\InlineCompletions\InlineCompletionsHandler.cs (1)
102
public async Task<VSInternalInlineCompletionList?> HandleRequestAsync(VSInternalInlineCompletionRequest request,
RequestContext
context, CancellationToken cancellationToken)
Handler\InlineCompletions\XmlSnippetParser.cs (1)
35
internal ParsedXmlSnippet? GetParsedXmlSnippet(SnippetInfo matchingSnippetInfo,
RequestContext
context)
Handler\MapCode\MapCodeHandler.cs (1)
35
public async Task<WorkspaceEdit?> HandleRequestAsync(VSInternalMapCodeParams request,
RequestContext
context, CancellationToken cancellationToken)
Handler\OnAutoInsert\OnAutoInsertHandler.cs (1)
46
RequestContext
context,
Handler\ProjectContext\GetTextDocumentWithContextHandler.cs (1)
33
public Task<VSProjectContextList?> HandleRequestAsync(VSGetProjectContextsParams request,
RequestContext
context, CancellationToken cancellationToken)
Handler\References\FindAllReferencesHandler.cs (1)
50
RequestContext
context,
Handler\References\FindImplementationsHandler.cs (1)
37
public Task<LSP.Location[]> HandleRequestAsync(LSP.TextDocumentPositionParams request,
RequestContext
context, CancellationToken cancellationToken)
Handler\Rename\PrepareRenameHandler.cs (1)
28
public Task<LSP.Range?> HandleRequestAsync(LSP.PrepareRenameParams request,
RequestContext
context, CancellationToken cancellationToken)
Handler\Rename\RenameHandler.cs (1)
31
public Task<WorkspaceEdit?> HandleRequestAsync(RenameParams request,
RequestContext
context, CancellationToken cancellationToken)
Handler\RequestContext.cs (2)
226
public static async Task<
RequestContext
> CreateAsync(
249
RequestContext
context;
Handler\RequestContextFactory.cs (4)
13
internal class RequestContextFactory : AbstractRequestContextFactory<
RequestContext
>, ILspService
22
public override Task<
RequestContext
> CreateRequestContextAsync<TRequestParam>(IQueueItem<
RequestContext
> queueItem, IMethodHandler methodHandler, TRequestParam requestParam, CancellationToken cancellationToken)
71
return
RequestContext
.CreateAsync(
Handler\SemanticTokens\SemanticTokensHelpers.cs (1)
31
RequestContext
context,
Handler\SemanticTokens\SemanticTokensRangeHandler.cs (1)
39
RequestContext
context,
Handler\ServerLifetime\InitializedHandler.cs (1)
22
public async Task HandleNotificationAsync(InitializedParams request,
RequestContext
requestContext, CancellationToken cancellationToken)
Handler\ServerLifetime\InitializeHandler.cs (1)
24
public Task<InitializeResult> HandleRequestAsync(InitializeParams request,
RequestContext
context, CancellationToken cancellationToken)
Handler\SignatureHelp\SignatureHelpHandler.cs (1)
33
public Task<LSP.SignatureHelp?> HandleRequestAsync(LSP.TextDocumentPositionParams request,
RequestContext
context, CancellationToken cancellationToken)
Handler\SourceGenerators\SourceGeneratedDocumentGetTextHandler.cs (1)
31
public async Task<SourceGeneratedDocumentText> HandleRequestAsync(SourceGeneratorGetTextParams request,
RequestContext
context, CancellationToken cancellationToken)
Handler\SourceGenerators\SourceGeneratorRefreshQueue.cs (1)
52
public Task OnInitializedAsync(ClientCapabilities clientCapabilities,
RequestContext
context, CancellationToken cancellationToken)
Handler\SpellCheck\AbstractSpellCheckingHandler.cs (4)
56
protected abstract ImmutableArray<Document> GetOrderedDocuments(
RequestContext
context, CancellationToken cancellationToken);
65
TParams requestParams,
RequestContext
context, CancellationToken cancellationToken)
138
RequestContext
context, ImmutableArray<PreviousPullResult> previousResults, CancellationToken cancellationToken)
205
RequestContext
context, ImmutableArray<PreviousPullResult> previousResults, BufferedProgress<TReport[]> progress, CancellationToken cancellationToken)
Handler\SpellCheck\DocumentSpellCheckHandler.cs (2)
35
protected override ImmutableArray<Document> GetOrderedDocuments(
RequestContext
context, CancellationToken cancellationToken)
38
internal static ImmutableArray<Document> GetRequestedDocument(
RequestContext
context)
Handler\SpellCheck\WorkspaceSpellCheckHandler.cs (1)
31
protected override ImmutableArray<Document> GetOrderedDocuments(
RequestContext
context, CancellationToken cancellationToken)
Handler\Symbols\DocumentSymbolsHandler.cs (1)
42
RoslynDocumentSymbolParams request,
RequestContext
context, CancellationToken cancellationToken)
Handler\Symbols\WorkspaceSymbolsHandler.cs (2)
50
public async Task<SumType<SymbolInformation[], WorkspaceSymbol[]>?> HandleRequestAsync(WorkspaceSymbolParams request,
RequestContext
context, CancellationToken cancellationToken)
73
RequestContext
context,
Handler\Tasks\DocumentTaskDiagnosticSourceProvider.cs (1)
26
public ValueTask<ImmutableArray<IDiagnosticSource>> CreateDiagnosticSourcesAsync(
RequestContext
context, CancellationToken cancellationToken)
Handler\Tasks\WorkspaceTaskDiagnosticSourceProvider.cs (1)
29
public ValueTask<ImmutableArray<IDiagnosticSource>> CreateDiagnosticSourcesAsync(
RequestContext
context, CancellationToken cancellationToken)
Handler\WorkspaceCommand\ExecuteWorkspaceCommandHandler.cs (1)
30
public async Task<object?> HandleRequestAsync(ExecuteCommandParams request,
RequestContext
context, CancellationToken cancellationToken)
ILanguageServerFactory.cs (1)
15
public AbstractLanguageServer<
RequestContext
> Create(
IOnInitialized.cs (1)
14
Task OnInitializedAsync(ClientCapabilities clientCapabilities,
RequestContext
context, CancellationToken cancellationToken);
RequestExecutionQueueProvider.cs (4)
13
[ExportCSharpVisualBasicStatelessLspService(typeof(IRequestExecutionQueueProvider<
RequestContext
>)), Shared]
16
internal sealed class RequestExecutionQueueProvider() : IRequestExecutionQueueProvider<
RequestContext
>
18
public IRequestExecutionQueue<
RequestContext
> CreateRequestExecutionQueue(AbstractLanguageServer<
RequestContext
> languageServer, ILspLogger logger, AbstractHandlerProvider handlerProvider)
RoslynLanguageServer.cs (5)
23
internal sealed class RoslynLanguageServer : SystemTextJsonLanguageServer<
RequestContext
>, IOnInitialized
63
protected override IRequestExecutionQueue<
RequestContext
> ConstructRequestExecutionQueue()
65
var provider = GetLspServices().GetRequiredService<IRequestExecutionQueueProvider<
RequestContext
>>();
89
AddLazyService<AbstractRequestContextFactory<
RequestContext
>>((lspServices) => new RequestContextFactory(lspServices));
162
public Task OnInitializedAsync(ClientCapabilities clientCapabilities,
RequestContext
context, CancellationToken cancellationToken)
RoslynRequestExecutionQueue.cs (2)
13
internal sealed class RoslynRequestExecutionQueue : RequestExecutionQueue<
RequestContext
>
22
public RoslynRequestExecutionQueue(AbstractLanguageServer<
RequestContext
> languageServer, ILspLogger logger, AbstractHandlerProvider handlerProvider)
Workspaces\LspWorkspaceManager.cs (2)
258
/// This is always called serially in the <see cref="RequestExecutionQueue{RequestContextType}"/> when creating the <see cref="
RequestContext
"/>.
276
/// This is always called serially in the <see cref="RequestExecutionQueue{RequestContextType}"/> when creating the <see cref="
RequestContext
"/>.