public GroceryItemController(IAuthService authService, IGroceryItemService grocceryItemService, IShopService shopService, IHubContext <GroceryItemHub> groceryItemHub, IHubContext <ShopHub> shopHub, IConfiguration config) : base(authService, config) { _grocceryItemService = grocceryItemService; _shopService = shopService; _groceryItemHub = groceryItemHub; _shopHub = shopHub; }
/// <summary> /// Initializes a new instance of the <see cref="GroceryController"/> class. /// </summary> /// <param name="appSettings">The application configuration.</param> /// <param name="logger">The logger to use.</param> /// <param name="localizer">The localized ressources to use.</param> /// <param name="speechToTextService">The <see cref="ISpeechToTextService"/> to use.</param> public GroceryController( IOptions <AppSettings> appSettings, ILogger <GroceryController> logger, IStringLocalizer <GroceryController> localizer, ISpeechToTextService speechToTextService, IGroceryActionService groceryActionService, IGroceryItemService groceryItemService) { if (appSettings == null) { throw new ArgumentNullException(nameof(appSettings)); } if (logger == null) { throw new ArgumentNullException(nameof(logger)); } if (localizer == null) { throw new ArgumentNullException(nameof(localizer)); } if (speechToTextService == null) { throw new ArgumentNullException(nameof(speechToTextService)); } if (groceryActionService == null) { throw new ArgumentNullException(nameof(groceryActionService)); } if (groceryItemService == null) { throw new ArgumentNullException(nameof(groceryItemService)); } this.appSettings = appSettings.Value; this.logger = logger; this.localizer = localizer; this.speechToTextService = speechToTextService; this.groceryActionService = groceryActionService; this.groceryItemService = groceryItemService; }
/// <summary> /// Initializes a new instance of the <see cref="GroceryItemsController"/> class. /// </summary> /// <param name="appSettings">The application configuration.</param> /// <param name="logger">The logger to use.</param> /// <param name="localizer">The localized ressources to use.</param> /// <param name="groceryItemService">The <see cref="IGroceryItemService"/> to use.</param> public GroceryItemsController( IOptions <AppSettings> appSettings, ILogger <GroceryItemsController> logger, IStringLocalizer <GroceryItemsController> localizer, IGroceryItemService groceryItemService) { if (appSettings == null) { throw new ArgumentNullException(nameof(appSettings)); } else { this.appSettings = appSettings.Value; } if (logger == null) { throw new ArgumentNullException(nameof(logger)); } else { this.logger = logger; } if (localizer == null) { throw new ArgumentNullException(nameof(localizer)); } else { this.localizer = localizer; } if (groceryItemService == null) { throw new ArgumentNullException(nameof(groceryItemService)); } else { this.groceryItemService = groceryItemService; } }
public GroceryItemController(IGroceryItemService groceryItemService) { this._groceryItemService = groceryItemService; }