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