Beispiel #1
0
        public override async Task <IList <IEvent> > ProcessAction()
        {
            ItemProcessor.InputData = InputData;

            var itemId = GetValue <string>("Id");

            var result = ItemProcessor.DeleteItem(itemId);

            if (result.Success == false)
            {
                return(new List <IEvent>()
                {
                    new ShowMessage(result.Message)
                });
            }

            var message = "Item deleted successfully";

            if (!String.IsNullOrWhiteSpace(result.Message))
            {
                message = result.Message;
            }

            var events = new List <IEvent>();

            events.Add(new CancelInputDialog());
            if (ViewToShowAfterModify != null)
            {
                events.Add(new ExecuteAction(ViewToShowAfterModify, ParametersToPassToViewAfterModify));
            }
            events.Add(new ShowMessage(message));

            return(events);
        }
Beispiel #2
0
 public async Task <Item> DeleteItem(Guid playerid, Guid itemid)
 {
     return(await _processor.DeleteItem(playerid, itemid));
 }
Beispiel #3
0
 public Task <Item> DeleteItem(Guid id, Guid itemId)
 {
     return(_context.DeleteItem(id, itemId));
 }