Exemplo n.º 1
0
        public DatabaseMenu(
            string menuName,
            ICommonServices services,
            Lazy <ICatalogSearchService> catalogSearchService,
            Lazy <ICategoryService> categoryService,
            IMenuStorage menuStorage,
            ILogger logger,
            IMenuPublisher menuPublisher,
            DbQuerySettings querySettings,
            Lazy <CatalogSettings> catalogSettings,
            Lazy <SearchSettings> searchSettings,
            IEnumerable <Lazy <IMenuItemProvider, MenuItemProviderMetadata> > menuItemProviders)
        {
            Guard.NotEmpty(menuName, nameof(menuName));

            Name = menuName;

            Services = services;
            _catalogSearchService = catalogSearchService;
            _categoryService      = categoryService;
            _menuStorage          = menuStorage;
            _logger            = logger;
            MenuPublisher      = menuPublisher;
            _querySettings     = querySettings;
            _catalogSettings   = catalogSettings;
            _searchSettings    = searchSettings;
            _menuItemProviders = menuItemProviders.ToDictionarySafe(x => x.Metadata.ProviderName, x => x);
        }
Exemplo n.º 2
0
 public PlanService(IRepository <Plan> planRepository,
                    IRepository <Package> packageRepository,
                    IRepository <PlanCommission> planCommissionRepository,
                    IRepository <StoreMapping> storeMappingRepository,
                    IRepository <AclRecord> aclRepository,
                    IWorkContext workContext,
                    IRequestCache requestCache)
 {
     _planRepository           = planRepository;
     _packageRepository        = packageRepository;
     _planCommissionRepository = planCommissionRepository;
     _storeMappingRepository   = storeMappingRepository;
     QuerySettings             = DbQuerySettings.Default;
     _aclRepository            = aclRepository;
     _workContext  = workContext;
     _requestCache = requestCache;
 }