Example #1
0
 public CustomerController(PostCommand <Customer> command, GetAllCommand <Customer> getCommand,
                           PutCommand <Customer> putCommand)
 {
     this.postCommand   = command;
     this.putCommand    = putCommand;
     this.getAllCommand = getCommand;
 }
Example #2
0
 public OrderController(PostCommand <Order> command, GetAllCommand <Order> getAllCommand,
                        DeleteCommand deleteCommand)
 {
     this.postCommand   = command;
     this.getAllCommand = getAllCommand;
     this.deleteCommand = deleteCommand;
 }
Example #3
0
 public TransactionController(PostCommand <Transaction> command, GetAllCommand <Transaction> getCommand,
                              GetStringCommand <Transaction> getStringCommand)
 {
     this.postCommand      = command;
     this.getAllCommand    = getCommand;
     this.getStringCommand = getStringCommand;
 }
Example #4
0
 public AccountController(PostCommand <Account> command, GetAllCommand <Account> getAllCommand,
                          GetStringCommand <Account> getStringCommand, DeleteCommand deleteCommand, PutCommand <Account> putCommand)
 {
     this.postCommand      = command;
     this.getAllCommand    = getAllCommand;
     this.getStringCommand = getStringCommand;
     this.deleteCommand    = deleteCommand;
     this.putCommand       = putCommand;
 }
        private string PerformGetAll(GetAllCommand command)
        {
            if (!_storage.IsEmpty)
            {
                return(_storage.Aggregate("", (current, keyValue) => current + ($"\nKey: {keyValue.Key}" + " " + $"Value: {keyValue.Value.Display()}")));
            }

            // TODO: add error handling
            return("The storage is empty");
        }
Example #6
0
        public Task <PagedList <CountryView> > Handle(GetAllCommand request, CancellationToken cancellationToken)
        {
            var pagedList = _countryService.GetAllCountries(request.Paged.PageIndex, request.Paged.PageSize);

            return(Task.FromResult(pagedList.ConvertPagedList <Nop.Core.Domain.Directory.Country, CountryView>()));
        }