Exemplo n.º 1
0
 public BarsController(IBarsService service, IBarViewMapper mapper, ICocktailViewMapper cocktailMapper, ICocktailsService cocktailService)
 {
     _service         = service ?? throw new ArgumentNullException("Bar service not found");
     _mapper          = mapper ?? throw new ArgumentNullException("Mapper not found");
     _cocktailMapper  = cocktailMapper ?? throw new ArgumentNullException("Mapper not found");
     _cocktailService = cocktailService ?? throw new ArgumentNullException("Cocktail service not found");
 }
 public CocktailsController(ICocktailsService service,
                            ICocktailViewMapper mapper,
                            IIngredientsService ingredientsService,
                            IUserInteractionsService userInteractionsService,
                            IBarViewMapper barMapper)
 {
     _service                 = service ?? throw new ArgumentNullException(nameof(service));
     _mapper                  = mapper ?? throw new ArgumentNullException(nameof(mapper));
     _ingredientsService      = ingredientsService ?? throw new ArgumentNullException(nameof(ingredientsService));
     _userInteractionsService = userInteractionsService ?? throw new ArgumentNullException(nameof(userInteractionsService));
     _barMapper               = barMapper ?? throw new ArgumentNullException(nameof(_barMapper));
 }
Exemplo n.º 3
0
 public HomeController(ILogger <HomeController> logger
                       , IBarsService barsService
                       , ICocktailsService cocktailsService
                       , IBarViewMapper barMapper
                       , ICocktailViewMapper cocktailMapper)
 {
     _logger           = logger;
     _barsService      = barsService;
     _cocktailsService = cocktailsService;
     _barMapper        = barMapper;
     _cocktailMapper   = cocktailMapper;
 }