예제 #1
0
        public WgShopController(IShopsService shopService, ISkuProductsService skuProductsService, ICacheProvider <ProductCategory> productCategoryCache,
                                IProductRecentlyViewedService productRecentlyViewedService, ISkuAttributesService skuAttributesService,
                                ISkuAttributeOptionsService skuAttributeOptionsService, IProductCategoriesService productCategoriesService,
                                IProductsService productsService, ISkuGroupsService skuGroupsService, ISkuVariantsService skuVariantsService)
            : base(shopService, skuProductsService, productCategoryCache, productRecentlyViewedService, skuAttributesService,
                   skuAttributeOptionsService, productCategoriesService, productsService, skuGroupsService, skuVariantsService)
        {
            if (shopService == null)
            {
                throw new ArgumentNullException("shopService");
            }
            if (skuProductsService == null)
            {
                throw new ArgumentNullException("skuProductsService");
            }
            if (productCategoryCache == null)
            {
                throw new ArgumentNullException("productCategoryCache");
            }
            if (productRecentlyViewedService == null)
            {
                throw new ArgumentNullException("productRecentlyViewedService");
            }
            if (skuAttributesService == null)
            {
                throw new ArgumentNullException("skuAttributesService");
            }
            if (skuAttributeOptionsService == null)
            {
                throw new ArgumentNullException("skuAttributeOptionsService");
            }
            if (productCategoriesService == null)
            {
                throw new ArgumentNullException("productCategoriesService");
            }
            if (productsService == null)
            {
                throw new ArgumentNullException("productsService");
            }
            if (skuGroupsService == null)
            {
                throw new ArgumentNullException("skuGroupsService");
            }
            if (skuVariantsService == null)
            {
                throw new ArgumentNullException("skuVariantsService");
            }

            _shopsService                 = shopService;
            _skuProductsService           = skuProductsService;
            _productCategoryCache         = productCategoryCache;
            _productRecentlyViewedService = productRecentlyViewedService;
            _skuAttributeOptionsService   = skuAttributeOptionsService;
            _skuAttributeService          = skuAttributesService;
            _productCategoriesService     = productCategoriesService;
            _productsService              = productsService;
            _skuGroupsService             = skuGroupsService;
            _skuVariantsService           = skuVariantsService;
        }
예제 #2
0
 public ProductCategoriesViewModel(IJSRuntime js, IProductCategoriesService service, IFileService fileService, AuthenticationStateProvider auth)
 {
     _js                   = js;
     _service              = service;
     _fileService          = fileService;
     _auth                 = auth;
     FilterFormEditContext = new EditContext(this);
 }
 public ProductCategoryChangesController(
     IUserContext userContext,
     IProductCategoriesService productCategoriesService,
     IProductCategoryChangesService productCategoryChangesService)
     : base(userContext)
 {
     _productCategoriesService      = productCategoriesService;
     _productCategoryChangesService = productCategoryChangesService;
 }
        /// <summary>
        /// Method to release unmanaged resources.
        /// </summary>
        /// <param name="disposing">Describes weather method is called from finalizer or manually.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                _service?.Dispose();
                _service = null;
            }

            base.Dispose(disposing);
        }
예제 #5
0
 public CategoriesController(
     ICategoriesService categoriesService,
     IArticlesService articlesService,
     IProductCategoriesService productCategoriesService,
     IStoreService storeService)
 {
     this.categoriesService        = categoriesService;
     this.articlesService          = articlesService;
     this.productCategoriesService = productCategoriesService;
     this.storeService             = storeService;
 }
예제 #6
0
        public ProductController(IProductService productService, IProductCategoriesService productCategories, IOptions <CloudinarySettings> cloudinaryConfig)
        {
            _productService    = productService;
            _productCategories = productCategories;
            _cloudinaryConfig  = cloudinaryConfig;
            Account account = new Account(
                _cloudinaryConfig.Value.CloudName,
                _cloudinaryConfig.Value.APIKey,
                _cloudinaryConfig.Value.APISecret
                );

            _cloudinary = new Cloudinary(account);
        }
예제 #7
0
 public WgShopSearchController(
     ISkuProductsService skuProductsService
     , ISkuAttributesService skuAttributeService
     , IProductCategoriesService productCategoriesService
     , ISkuAttributeOptionsService skuAttributeOptionsService
     , ICustomSearchTermService customSearchTermService)
 {
     _skuProductsService         = skuProductsService;
     _skuAttributeService        = skuAttributeService;
     _productCategoriesService   = productCategoriesService;
     _skuAttributeOptionsService = skuAttributeOptionsService;
     _customSearchTermService    = customSearchTermService;
 }
예제 #8
0
        public AdminController(UserManager <ApplicationUser> userManager, IProductService productService, IProductCategoriesService productCategories, IOptions <CloudinarySettings> cloudinaryConfig)
        {
            _userManager       = userManager;
            _productService    = productService;
            _productCategories = productCategories;
            _cloudinaryConfig  = cloudinaryConfig;
            Account account = new Account(
                _cloudinaryConfig.Value.CloudName,
                _cloudinaryConfig.Value.APIKey,
                _cloudinaryConfig.Value.APISecret
                );

            _cloudinary = new Cloudinary(account);
        }
예제 #9
0
        public ProductAddOrUpdateValidationAndEnrichment(
            IUnderlyingsCache underlyingsCache,
            ICurrenciesService currenciesService,
            IMarketSettingsRepository marketSettingsRepository,
            IProductCategoriesService productCategoriesService,
            ITickFormulaRepository tickFormulaRepository,
            IAssetTypesRepository assetTypesRepository)
        {
            _underlyingsCache         = underlyingsCache;
            _currenciesService        = currenciesService;
            _marketSettingsRepository = marketSettingsRepository;
            _productCategoriesService = productCategoriesService;
            _tickFormulaRepository    = tickFormulaRepository;
            _assetTypesRepository     = assetTypesRepository;

            AddValidation(UnderlyingMustExist);
            AddValidation(CurrencyMustExist);
            AddValidation(MarketSettingsMustExist);
            AddValidation(TickFormulaMustExist);
            AddValidation(AssetTypeMustExist);
            AddValidation(SetCategoryIdAsync);
            AddValidation(SetExistingFields);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="CategoriesController"/> class.
 /// </summary>
 /// <param name="productCategoriesService">The product categories service.</param>
 public CategoriesController(IProductCategoriesService productCategoriesService)
 {
     _productCategoriesService = productCategoriesService;
 }
예제 #11
0
 public ProductCategoriesController(IProductCategoriesService unitOfWork)
 {
     _context = unitOfWork;
 }
 public ProductCategoriesController(IProductCategoriesService productCategoriesService,
                                    IConvertService convertService)
 {
     _productCategoriesService = productCategoriesService;
     _convertService           = convertService;
 }
예제 #13
0
 public ProductCategoriesController(IProductCategoriesService service, IHostEnvironment environment)
 {
     _service     = service;
     _environment = environment;
 }
예제 #14
0
 public ProductCategoriesController(IUserContext userContext, IProductCategoriesService userCategoriesService)
     : base(userContext)
 {
     _userContext           = userContext;
     _userCategoriesService = userCategoriesService;
 }
예제 #15
0
 public ProductsController(IStoreService storeService, IProductCategoriesService productCategoriesService)
 {
     this.storeService             = storeService;
     this.productCategoriesService = productCategoriesService;
 }
 /// <summary>
 /// This constrcutor receives services instnaces by dependency injection configured in UnityConfig.cs
 /// </summary>
 /// <param name="productService"></param>
 /// <param name="productCategoriesService"></param>
 public ProductsController(IProductService productService, IProductCategoriesService productCategoriesService)
 {
     this.productService           = productService;
     this.productCategoriesService = productCategoriesService;
 }
예제 #17
0
 /// <summary>
 ///  Initializes apiController to work with product categories.
 /// </summary>
 /// <param name="service">Product categories service.</param>
 public ProductCategoriesController(IProductCategoriesService service)
 {
     _service = service;
 }
 public ProductCategoryController(IProductCategoriesService iProductCategoryService)
 {
     _iProductCategoryService = iProductCategoryService;
 }
예제 #19
0
        public WgShopController(IShopsService shopService, ISkuProductsService skuProductsService,
                                ICacheProvider <ProductCategory> productCategoryCache,
                                IProductRecentlyViewedService productRecentlyViewedService, ISkuAttributesService skuAttributesService,
                                ISkuAttributeOptionsService skuAttributeOptionsService, IProductCategoriesService productCategoriesService,
                                IProductsService productsService, ISkuGroupsService skuGroupsService, ISkuVariantsService skuVariantsService,
                                ISkuColourService skuColourService, ICustomSearchTermService customSearchTermService,
                                IDeliveryChargeService deliveryChargeService, ISkuService skuService, ISkuPricesService skuPricesService)
            : base(
                shopService, skuProductsService, productCategoryCache, productRecentlyViewedService,
                skuAttributesService,
                skuAttributeOptionsService, productCategoriesService, productsService, skuGroupsService,
                skuVariantsService,
                skuColourService, deliveryChargeService, skuService, skuPricesService)
        {
            _customSearchTermService = customSearchTermService;

            _b2bCheckoutService = new B2BCheckoutService(
                GetService <ITransactionService>(),
                CommerceContext, GetService <IShopsService>(),
                VisitorTrackingContext,
                GetService <ICurrencyService>(),
                ColonyContext);
        }
예제 #20
0
 public ShopController(IProductService productService, IProductCategoriesService productCategories)
 {
     _productService    = productService;
     _productCategories = productCategories;
 }
예제 #21
0
 public ProductCategoriesController(IProductCategoriesService productCategoriesService, IClaimsGetter claimsGetter, IUsersService usersService)
 {
     _productCategoriesService = productCategoriesService;
     _claimsGetter             = claimsGetter;
     _usersService             = usersService;
 }