public Task HandleAsync(CancelCommand command) { var cmd = _commandStore.GetCommand(command.CmdId); cmd.CancellationSource.Cancel(); return(Task.CompletedTask); }
public bool CancelCommand(Guid commandId) { var command = _commandStore.GetCommand(commandId); if (command is null) { return(false); } command.CancellationSource.Cancel(); //command.Dispose(); return(true); }