Example #1
0
        public Task HandleAsync(CancelCommand command)
        {
            var cmd = _commandStore.GetCommand(command.CmdId);

            cmd.CancellationSource.Cancel();
            return(Task.CompletedTask);
        }
Example #2
0
        public bool CancelCommand(Guid commandId)
        {
            var command = _commandStore.GetCommand(commandId);

            if (command is null)
            {
                return(false);
            }
            command.CancellationSource.Cancel();
            //command.Dispose();
            return(true);
        }