Esempio n. 1
0
 public AbilityService(INWScript script,
                       IDataContext db,
                       IPerkService perk,
                       IPVPSanctuaryService pvpSanctuary,
                       ITimeService time,
                       IBiowarePosition biowarePosition,
                       INWNXPlayer nwnxPlayer,
                       IColorTokenService color,
                       IRandomService random,
                       IFoodService food,
                       IEnmityService enmity,
                       INWNXEvents nwnxEvents,
                       INWNXDamage nwnxDamage,
                       ICustomEffectService customEffect)
 {
     _                = script;
     _db              = db;
     _perk            = perk;
     _pvpSanctuary    = pvpSanctuary;
     _time            = time;
     _biowarePosition = biowarePosition;
     _nwnxPlayer      = nwnxPlayer;
     _color           = color;
     _random          = random;
     _food            = food;
     _enmity          = enmity;
     _nwnxEvents      = nwnxEvents;
     _nwnxDamage      = nwnxDamage;
     _customEffect    = customEffect;
 }
Esempio n. 2
0
        public RecipesController(IRecipeService recipeService, IFoodService foodService, IMapper mapper, INotificator notificator)
            : base(mapper, notificator)
        {
            _recipeService = recipeService;

            _foodService = foodService;
        }
Esempio n. 3
0
        public FoodQuery(IFoodService foodService)
        {
            Name        = "FoodQuery";
            Description = "这里包含了有菜单";

            FieldAsync <ListGraphType <FoodType> >(
                "foods",
                arguments: new QueryArguments(
                    new QueryArgument <IntGraphType> {
                Name = "limit"
            },
                    new QueryArgument <IntGraphType> {
                Name = "offset"
            }
                    ),
                resolve: async context =>
            {
                var page = new Pageable(context, 120);

                return(await foodService.GetAllFoodWithOffsetAndLimit(page.Offset, page.Limit));
            });

            FieldAsync <ListGraphType <CategoryType> >("categories", resolve: async context =>
            {
                return(await foodService.GetAllCategories());
            });
        }
Esempio n. 4
0
 public FoodController(IFoodService iFoodService, IFoodsService foodsService, IWebHostEnvironment webHostEnvironment, TagService tagService)
 {
     this.iFoodService       = iFoodService;
     this.foodsService       = foodsService;
     this.webHostEnvironment = webHostEnvironment;
     this.tagService         = tagService;
 }
Esempio n. 5
0
 public DietController(IDietService dietService, IMapper mapper, IMealService mealService, IFoodService foodService)
 {
     this.dietService = dietService;
     this.mealService = mealService;
     this.foodService = foodService;
     this.mapper      = mapper;
 }
Esempio n. 6
0
 public FoodInfoController(IFoodService foodService, ISuggestBoxService suggestBoxService, IUserService userService, ILogger logger)
 {
     _foodService       = foodService;
     _suggestBoxService = suggestBoxService;
     _userService       = userService;
     _ILogger           = logger;
 }
Esempio n. 7
0
        public FoodsController(IFoodService foodService, INutrientService nutrientService, IMapper mapper, INotificator notificator)
            : base(mapper, notificator)
        {
            _foodService = foodService;

            _nutrientService = nutrientService;
        }
 public CalculateController(IFoodService food, UserManager<User> userManager, ICalculatorService calculator)
 {
     
     this.food = food;
     this.userManager = userManager;
     this.calculator = calculator;
 }
Esempio n. 9
0
 public CraftService(
     INWScript script,
     IDataContext db,
     IPerkService perk,
     ISkillService skill,
     IColorTokenService color,
     IItemService item,
     INWNXPlayer nwnxPlayer,
     IFoodService food,
     IRandomService random,
     IDurabilityService durability,
     IErrorService error)
 {
     _           = script;
     _db         = db;
     _perk       = perk;
     _skill      = skill;
     _color      = color;
     _item       = item;
     _nwnxPlayer = nwnxPlayer;
     _food       = food;
     _random     = random;
     _durability = durability;
     _error      = error;
 }
Esempio n. 10
0
 public UserController(IMapper mapper, IUserService userService, IFoodService foodService, IFood_CategoryService categoryService, IDietService dietService)
 {
     this.mapper              = mapper;
     this.userService         = userService;
     this.foodService         = foodService;
     this.foodCategoryService = categoryService;
     this.dietService         = dietService;
 }
Esempio n. 11
0
        public LoadDataController(IFoodService foodService, IWorkEnvironment workEnvironment)
        {
            _foodService    = foodService;
            _workEnviroment = workEnvironment;

            _dataSource = new XDataHelpers.XDataRepository(_foodService, _workEnviroment);
            _dataSource.ExtractDatas();
        }
Esempio n. 12
0
 public FoodsController(
     IFoodService foodService,
     IFoodTypeService foodTypeService
     )
 {
     _foodService     = foodService;
     _foodTypeService = foodTypeService;
 }
Esempio n. 13
0
 public MealController(IMapper mapper, IMealService mealService, IHostEnvironment environment, IFood_CategoryService foodCategoryService, IFoodService foodService)
 {
     this.environment         = environment;
     this.mapper              = mapper;
     this.mealService         = mealService;
     this.foodCategoryService = foodCategoryService;
     this.foodService         = foodService;
 }
Esempio n. 14
0
 public HomeController(IUserService _userService, CategoryService _categoryService, IFoodService iFoodService, IRestaurantService _iRestaurantService, TagService _tagService)
 {
     userService        = _userService;
     categoryService    = _categoryService;
     this.iFoodService  = iFoodService;
     iRestaurantService = _iRestaurantService;
     tagService         = _tagService;
 }
Esempio n. 15
0
        public LoadDataController(IFoodService foodService, IWorkEnvironment workEnvironment)
        {
            _foodService = foodService;
            _workEnviroment = workEnvironment;

            _dataSource = new XDataHelpers.XDataRepository(_foodService, _workEnviroment);
            _dataSource.ExtractDatas();
        }
Esempio n. 16
0
 public FoodController(
     ILogger <FoodController> logger,
     IFoodService foodService
     )
 {
     _logger      = logger;
     _foodService = foodService;
 }
Esempio n. 17
0
 public BookingController(IReservationService reservationService,
                          IFoodService foodService, IOrderService orderService, IUserService userService)
 {
     _reservationService = reservationService;
     _foodService        = foodService;
     _orderService       = orderService;
     _userService        = userService;
 }
Esempio n. 18
0
 public RecipeService(IFoodService foodService,
                      IUnitOfWork unitOfWork, RecipeValidator validator, INotificator notificator, ILogger <RecipeService> logger,
                      IStringLocalizer <SharedResources> localizer)
     : base(unitOfWork, validator, notificator, logger)
 {
     _foodService = foodService;
     _localizer   = localizer;
 }
Esempio n. 19
0
 public FoodController(
     IFoodService foodService,
     IUserService userService,
     IMapper mapper)
 {
     _foodService = foodService;
     _userService = userService;
     _mapper      = mapper;
 }
Esempio n. 20
0
 public SlackCommandHandler(
     ISlackApiClient slack,
     IFoodService foodService,
     ExecutionContext context)
 {
     this.slack       = slack;
     this.foodService = foodService;
     this.context     = context;
 }
Esempio n. 21
0
 public MenuItemController(
       IMenuItemService menuItemService
     , IFoodService foodService
     , IMenuService menuService)
 {
     _menuItemService = menuItemService;
     _foodService = foodService;
     _menuService = menuService;
 }
Esempio n. 22
0
 public RestaurantController(IRestaurantService restaurantService, ITypeOfRestauranService type, IRestaurantTableService table, IFoodService food, IRoleService roles, IUserService userserv, IFriendService ifr)
 {
     this.typeOfRestaurantService = type;
     this.restaurantService = restaurantService;
     this.restaurantTableService = table;
     this.foodService = food;
     this.roleService = roles;
     this.userService = userserv;
     this.friendService = ifr;
 }
Esempio n. 23
0
 public MainMenu(IManufacturerService manufacturerService, IClientController clientController, IAddressController addressController,
                 IFoodService foodontroller, IBasketController basketController, ICurrencyController currencyController)
 {
     _clientController    = clientController;
     _manufacturerService = manufacturerService;
     _addressController   = addressController;
     _foodontroller       = foodontroller;
     _basketController    = basketController;
     _currencyController  = currencyController;
 }
        public void Save(ICollection <TOut> classToSave, IKernel kernel)
        {
            IFoodService       service = kernel.Get <IFoodService>();
            ICollection <Food> foods   = (List <Food>)classToSave;

            foreach (Food food in foods)
            {
                service.Add(food);
            }
            service.Complete();
        }
Esempio n. 25
0
        public FoodMutation(IFoodService foodService)
        {
            Name        = "foodMutation";
            Description = "所谓菜品修改相关";

            FieldAsync <BooleanGraphType>(
                "createFood",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <FoodInputType> > {
                Name = "food"
            }
                    ),
                resolve: async context =>
            {
                var food = context.GetArgument <Food>("food");

                return(await foodService.AddFood(food));
            }
                );

            FieldAsync <BooleanGraphType>(
                "updateFood",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <IntGraphType> > {
                Name = "foodId"
            },
                    new QueryArgument <NonNullGraphType <FoodInputType> > {
                Name = "food"
            }
                    ),
                resolve: async context =>
            {
                var food = context.GetArgument <Food>("food");
                food.Id  = context.GetArgument <int>("foodId");

                return(await foodService.UpdateFood(food));
            }
                );

            FieldAsync <BooleanGraphType>(
                "deleteFood",
                arguments: new QueryArguments(
                    new QueryArgument <IntGraphType> {
                Name = "foodId"
            }
                    ),
                resolve: async context =>
            {
                var foodId = context.GetArgument <int>("foodId");

                return(await foodService.DeleteFoodById(foodId));
            }
                );
        }
Esempio n. 26
0
        public FoodController(IFoodService foodService, IMappingService mappingService)
        {
            if (foodService == null)
                throw new ArgumentNullException("foodService");

            if (mappingService == null)
                throw new ArgumentNullException("mappingService");

            _foodService = foodService;
            _mappingService = mappingService;
        }
Esempio n. 27
0
 public Food(IStorageFile image, DateTime date, IFoodService foodService, IEventAggregator eventAggregator)
 {
     this.Id    = Guid.NewGuid().ToString();
     this.Image = image;
     if (image != null)
     {
         this.Name = image.Name;
     }
     this.Date            = date;
     this.foodService     = foodService;
     this.eventAggregator = eventAggregator;
 }
Esempio n. 28
0
        /// <summary>
        /// Creates a new RatingViewModel.
        /// </summary>
        public RatingViewModel(IFoodService foodService, IPluginSettings pluginSettings,
                               INavigationService navigationService, IDeviceIdentifier deviceIdentifier,
                               Meal meal)
        {
            _foodService       = foodService;
            _pluginSettings    = pluginSettings;
            _navigationService = navigationService;
            _deviceIdentifier  = deviceIdentifier;

            Meal   = meal;
            Rating = UserRating.Neutral;
            Status = VoteStatus.Success;
        }
        public SandwichViewModel ShowAll()
        {
            IFoodService foodService = DependencyResolver.Current.GetService <IFoodService>();

            //Mapper.CreateMap()

            // Need to set a autio mapper to map Bussiness model with UI view Model
            var sandwiches = foodService.GetAllSandwiches();

            SandwichViewModel sandwichViewModels1; //= Mapper.Map<SandwichViewModel>(sandwiches);

            return(null);
        }
Esempio n. 30
0
 public FinishSmelt(INWScript script,
                    ISkillService skill,
                    ICraftService craft,
                    IRandomService random,
                    IPerkService perk,
                    IFoodService food)
 {
     _       = script;
     _skill  = skill;
     _craft  = craft;
     _random = random;
     _perk   = perk;
     _food   = food;
 }
Esempio n. 31
0
        public FoodQuery(IFoodService foodService)
        {
            Name        = "FoodQuery";
            Description = "这里包含了有菜单";

            FieldAsync <ListGraphType <FoodType> >("foods", resolve: async context =>
            {
                return(await foodService.GetAllFoodWithOffsetAndLimit(0, 120));
            });
            FieldAsync <ListGraphType <CategoryType> >("categories", resolve: async context =>
            {
                return(await foodService.GetAllCategories());
            });
        }
Esempio n. 32
0
 public FoodController(
     IAccountService AccountService,
     IFoodService FoodService,
     IOrderService OrderService,
     IOrderContentService OrderContentService,
     ICurrentContext CurrentContext
     )
 {
     this.AccountService      = AccountService;
     this.FoodService         = FoodService;
     this.OrderService        = OrderService;
     this.OrderContentService = OrderContentService;
     this.CurrentContext      = CurrentContext;
 }
Esempio n. 33
0
        public BasicQuery(
            IRoomService roomService,
            IFoodService foodService,
            IUserService userService
            )
        {
            Name        = "query";
            Description = "查询功能模块,除 user token 登陆外都需要权限";

            Field <RoomQuery>("room", resolve: _ => new { });

            Field <FoodQuery>("food", resolve: _ => new { }).AuthorizeWith(Policy.WaiterPolicy);;

            Field <UserQuery>("user", resolve: _ => new { });
        }
Esempio n. 34
0
 public OnModuleHeartbeat(INWScript script,
                          IDataContext db,
                          IFoodService food,
                          ICustomEffectService customEffect,
                          IItemService item,
                          IEffectTrackerService effectTracker,
                          IAbilityService ability)
 {
     _              = script;
     _db            = db;
     _food          = food;
     _customEffect  = customEffect;
     _item          = item;
     _effectTracker = effectTracker;
     _ability       = ability;
 }
Esempio n. 35
0
 public FoodData(IFoodService foodService)
 {
     this.foodService = foodService;
 }
Esempio n. 36
0
 public DataController(IFoodService foodService, IFoodData foodData)
 {
     this.foodService = foodService;
     this.foodData = foodData;
 }
 public FoodController(IFoodService foodService)
 {
     _foodService = foodService;
 }
Esempio n. 38
0
 public FoodController(IMappingEngine mapper, IFoodService foodService)
 {
     this.mapper = mapper;
     this.foodService = foodService;
 }