Beispiel #1
0
        public async Task <ActionResult <RequestStatusDto> > RemoveAuctionImage(
            [FromQuery] RemoveImageCommandDto commandDto)
        {
            var cmd      = new RemoveImageCommand(commandDto.ImgNum);
            var response = await _httpQueuedCommandMediator.Send(cmd);

            return(this.StatusResponse(response));
        }
        private void UpdateCommands()
        {
            RemoveImageCommand.RaiseCanExecuteChanged();
            SaveCommand.RaiseCanExecuteChanged();
            RedoCommand.RaiseCanExecuteChanged();
            UndoCommand.RaiseCanExecuteChanged();

            RemoveBackgroundCommand.RaiseCanExecuteChanged();
            RemoveOverlayCommand.RaiseCanExecuteChanged();
        }
 public Task <bool> Handle(RemoveImageCommand request, CancellationToken cancellationToken)
 {
     if (!request.IsValid())
     {
         NotifyValidationErrors(request);
         return(Task.FromResult(false));
     }
     _imageRepository.Remove(request.ImageId);
     if (Commit())
     {
         _bus.RaiseEvent(new ImageRemovedEvent(request.ImageId));
     }
     return(Task.FromResult(true));
 }
Beispiel #4
0
        public void Remove(int id)
        {
            var removeCommand = new RemoveImageCommand(id);

            Bus.SendCommand(removeCommand);
        }