public NutritionController(IViewModelFactory viewModelFactory, IDateTimeProvider dateTimeProvider, INutritionService nutritionService, IAuthenticationProvider authenticationProvider) { if (authenticationProvider == null) { throw new ArgumentNullException(nameof(authenticationProvider)); } if (viewModelFactory == null) { throw new ArgumentNullException(nameof(viewModelFactory)); } if (dateTimeProvider == null) { throw new ArgumentNullException(nameof(dateTimeProvider)); } if (nutritionService == null) { throw new ArgumentNullException(nameof(nutritionService)); } this.viewModelFactory = viewModelFactory; this.dateTimeProvider = dateTimeProvider; this.nutritionService = nutritionService; this.authenticationProvider = authenticationProvider; }
public GetMezajTypeQueryHandler(ILogger logger, ITelegramClientService telegramClientService, INutritionRepository nutritionRepository, INutritionService nutritionService, ILogger logger1) : base(logger) { _telegramClientService = telegramClientService; _nutritionRepository = nutritionRepository; _nutritionService = nutritionService; _logger = logger1; }
public NutritionController(INutritionService nutritionService) { this.nutritionService = nutritionService; }
public GetMezajTypeDtqValidator(INutritionService nutritionService) { //RuleFor(x => x.Message.Text) // .MustAsync(async (o, text, cancel) => await nutritionService.IsValidNutrition(text)) // .WithMessage("خوراکی مورد نظر یافت نشد"); }
public MemberApiController() { _memberservice = GenericFactory.CreateInastance <IMemberService>(typeof(MemberService)); _nutritionservice = GenericFactory.CreateInastance <INutritionService>(typeof(NutritionService)); }