-
-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathIVisualStudioService.cs
More file actions
38 lines (32 loc) · 1.66 KB
/
IVisualStudioService.cs
File metadata and controls
38 lines (32 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System.Collections.Generic;
using System.Threading.Tasks;
using CodingWithCalvin.MCPServer.Shared.Models;
namespace CodingWithCalvin.MCPServer.Services;
public interface IVisualStudioService
{
Task<SolutionInfo?> GetSolutionInfoAsync();
Task<bool> OpenSolutionAsync(string path);
Task CloseSolutionAsync(bool saveFirst = true);
Task<List<ProjectInfo>> GetProjectsAsync();
Task<List<DocumentInfo>> GetOpenDocumentsAsync();
Task<DocumentInfo?> GetActiveDocumentAsync();
Task<bool> OpenDocumentAsync(string path);
Task<bool> CloseDocumentAsync(string path, bool save = true);
Task<string?> ReadDocumentAsync(string path);
Task<bool> WriteDocumentAsync(string path, string content);
Task<SelectionInfo?> GetSelectionAsync();
Task<bool> SetSelectionAsync(string path, int startLine, int startColumn, int endLine, int endColumn);
Task<bool> InsertTextAsync(string text);
Task<bool> ReplaceTextAsync(string oldText, string newText);
Task<bool> GoToLineAsync(int line);
Task<List<FindResult>> FindAsync(string searchText, bool matchCase = false, bool wholeWord = false);
Task<bool> BuildSolutionAsync();
Task<bool> BuildProjectAsync(string projectName);
Task<bool> CleanSolutionAsync();
Task<bool> CancelBuildAsync();
Task<BuildStatus> GetBuildStatusAsync();
Task<List<SymbolInfo>> GetDocumentSymbolsAsync(string path);
Task<WorkspaceSymbolResult> SearchWorkspaceSymbolsAsync(string query, int maxResults = 100);
Task<DefinitionResult> GoToDefinitionAsync(string path, int line, int column);
Task<ReferencesResult> FindReferencesAsync(string path, int line, int column, int maxResults = 100);
}