private static async Task <WorkspaceEdit> RunRenameAsync(Solution solution, LSP.RenameParams renameParams) { var queue = CreateRequestQueue(solution); return(await GetLanguageServer(solution).ExecuteRequestAsync <LSP.RenameParams, LSP.WorkspaceEdit>(queue, LSP.Methods.TextDocumentRenameName, renameParams, new LSP.ClientCapabilities(), null, CancellationToken.None)); }
private static async Task <WorkspaceEdit> RunRenameAsync( TestLspServer testLspServer, LSP.RenameParams renameParams ) { return(await testLspServer.ExecuteRequestAsync <LSP.RenameParams, LSP.WorkspaceEdit>( LSP.Methods.TextDocumentRenameName, renameParams, new LSP.ClientCapabilities(), null, CancellationToken.None )); }
/// <summary> /// Answers a rename request by returning the workspace edit for a given symbol. /// https://microsoft.github.io/language-server-protocol/specification#textDocument_rename /// </summary> /// <param name="solution">the solution containing the request.</param> /// <param name="request">the document position of the symbol to rename.</param> /// <param name="clientCapabilities">the client capabilities for the request.</param> /// <param name="cancellationToken">a cancellation token.</param> /// <returns>the workspace edits to rename the given symbol</returns> public Task <WorkspaceEdit> RenameAsync(Solution solution, LSP.RenameParams request, LSP.ClientCapabilities clientCapabilities, CancellationToken cancellationToken) => ExecuteRequestAsync <LSP.RenameParams, WorkspaceEdit>(LSP.Methods.TextDocumentRenameName, solution, request, clientCapabilities, cancellationToken);