static void Main(string[] args) { Console.WriteLine("Hello World!"); IBagFactory bagFactory = new DefaultBagFactory(); IBagService bagService = bagFactory.GetBagService(); IAnimalFactory factory = new AnimalFactory(); bagService.AddAnimal(factory.CreateAnimal("mops", 3, AnimalType.OKKAM)); bagService.AddAnimal(factory.CreateAnimal("sharpey", 3, AnimalType.OKKAM)); bagService.SetDay(); Console.WriteLine("NovDay"); Console.WriteLine(bagService.CommandVoiceToConcreteAnimal("mops")); Console.WriteLine(bagService.CommandVoiceToConcreteAnimal("sharpey")); Console.WriteLine(bagService.CommandVoiceToAllAnimals()); bagService.SetNight(); Console.WriteLine("NovNight"); Console.WriteLine(bagService.CommandVoiceToConcreteAnimal("mops")); Console.WriteLine(bagService.CommandVoiceToConcreteAnimal("sharpey")); try { Console.WriteLine(bagService.CommandVoiceToAllAnimals()); } catch (CallAllAnimalsAtNightException e) { Console.WriteLine(e.GetType()); } Console.WriteLine("GetTotalFoodWeightPerDay"); Console.WriteLine(bagService.GetTotalFoodWeightPerDay()); Console.WriteLine("CountAllAnimals"); Console.WriteLine(bagService.CountAllAnimals()); Console.WriteLine("GetAverageFoodWeightPerAnimal"); Console.WriteLine(bagService.GetAverageFoodWeightPerAnimal()); }
public ProductsController( IProductsService productsService, ICategoryService categoryService, IBagService bagService, UserManager <ApplicationUser> userManager, IDiscountsService discountsService) { this.productsService = productsService; this.categoryService = categoryService; this.bagService = bagService; this.userManager = userManager; this.discountsService = discountsService; }
public AdministrationController( IProductsService productsService, IImgService imgService, ICategoryService categoryService, IBagService bagService, IOrderDataService orderDataService, IDiscountsService discountsService) { this.productsService = productsService; this.imgService = imgService; this.categoryService = categoryService; this.bagService = bagService; this.orderDataService = orderDataService; this.discountsService = discountsService; }
public HomeController(UserManager <User> userManager, IBagService bagService) { var user = this.userManager; this.bagService = bagService; }
public BagController(IBagService bagService, UserManager <ApplicationUser> userManager, IDiscountsService discountsService) { this.bagService = bagService; this.userManager = userManager; this.discountsService = discountsService; }
public BagsController(IBagService bagService, UserManager <User> userManager) { this.bagService = bagService; this.userManager = userManager; }