public override async Task HandleStatusAsync(CommandStatusResult statusResult, RequestDetails requestDetails, RequestMessageHeaders headers, IExtensionGatewayClient client, ILogger log) { if (client.CanSendUserNotification) { var notificationPayload = new { Command = statusResult.CommandName, VehicleId = statusResult.VehicleId, CorrelationId = statusResult.Payload.CorrelationId, Message = statusResult.Payload.Payload, Time = statusResult.Payload.Time }; await client.SendUserNotificationAsync(notificationPayload); } }
public async Task <CommandStatusResult> GetCommandStatusAsync(IImmutableSet <IProjectTree> nodes, long commandId, bool focused, string commandText, CommandStatus progressiveStatus) { await _taskService.DrainTaskQueueAsync(); CommandStatusResult result = CommandStatusResult.Unhandled; switch ((VSConstants.VSStd97CmdID)commandId) { case VSConstants.VSStd97CmdID.AddNewItem: progressiveStatus |= CommandStatus.Enabled | CommandStatus.Supported; result = new CommandStatusResult(true, commandText, progressiveStatus); break; } return(result); }