File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -712,6 +712,15 @@ export class RoslynLanguageServer {
712712 throw new Error ( `Invalid log level ${ logLevel } ` ) ;
713713 }
714714 }
715+
716+ public async getBuildOnlyDiagnosticIds ( token : vscode . CancellationToken ) : Promise < string [ ] > {
717+ const response = await _languageServer . sendRequest0 ( RoslynProtocol . BuildOnlyDiagnosticIdsRequest . type , token ) ;
718+ if ( response ) {
719+ return response . ids ;
720+ }
721+
722+ throw new Error ( 'Unable to retrieve build-only diagnostic ids for current solution.' ) ;
723+ }
715724}
716725
717726/**
Original file line number Diff line number Diff line change @@ -131,6 +131,10 @@ export interface ShowToastNotificationParams {
131131 commands : Command [ ] ;
132132}
133133
134+ export interface BuildOnlyDiagnosticIdsResult {
135+ ids : string [ ] ;
136+ }
137+
134138export namespace WorkspaceDebugConfigurationRequest {
135139 export const method = 'workspace/debugConfiguration' ;
136140 export const messageDirection : lsp . MessageDirection = lsp . MessageDirection . clientToServer ;
@@ -192,3 +196,9 @@ export namespace OpenProjectNotification {
192196 export const messageDirection : lsp . MessageDirection = lsp . MessageDirection . clientToServer ;
193197 export const type = new lsp . NotificationType < OpenProjectParams > ( method ) ;
194198}
199+
200+ export namespace BuildOnlyDiagnosticIdsRequest {
201+ export const method = 'workspace/buildOnlyDiagnosticIds' ;
202+ export const messageDirection : lsp . MessageDirection = lsp . MessageDirection . clientToServer ;
203+ export const type = new lsp . RequestType0 < BuildOnlyDiagnosticIdsResult , void > ( method ) ;
204+ }
You can’t perform that action at this time.
0 commit comments