Ejemplo n.º 1
0
        public CategoryBrowsingViewService(ISearchRepository searchRepository,
                                           IDamProvider damProvider,
                                           ILocalizationProvider localizationProvider,
                                           ISearchUrlProvider searchUrlProvider,
                                           ICategoryRepository categoryRepository,
                                           ICategoryBrowsingUrlProvider categoryBrowsingUrlProvider,
                                           IFacetFactory facetFactory,
                                           ISelectedFacetFactory selectedFacetFactory,
                                           IComposerContext composerContext,
                                           IFulfillmentContext fulfillmentContext,
                                           IProductSearchViewModelFactory productSearchViewModelFactory)

            : base(searchRepository,
                   damProvider,
                   localizationProvider,
                   searchUrlProvider,
                   facetFactory,
                   selectedFacetFactory,
                   composerContext,
                   productSearchViewModelFactory,
                   categoryRepository)

        {
            CategoryRepository          = categoryRepository ?? throw new ArgumentNullException(nameof(categoryRepository));
            CategoryBrowsingUrlProvider = categoryBrowsingUrlProvider ?? throw new ArgumentNullException(nameof(categoryBrowsingUrlProvider));
            FulfillmentContext          = fulfillmentContext ?? throw new ArgumentNullException(nameof(fulfillmentContext));
        }
 public SearchQueryViewService(
     ICategoryRepository categoryRepository,
     ISearchRepository searchRepository,
     IDamProvider damProvider,
     ILocalizationProvider localizationProvider,
     ISearchUrlProvider searchUrlProvider,
     IFacetFactory facetFactory,
     ISelectedFacetFactory selectedFacetFactory,
     IComposerContext composerContext,
     ISearchQueryRepository searchQueryRepository,
     ISearchQueryUrlProvider searchQueryUrlProvider,
     IProductSettingsRepository productSettingsRepository,
     Repositories.IInventoryRepository inventoryRepository,
     IProductSearchViewModelFactory productSearchViewModelFactory)
     : base(
         searchRepository,
         damProvider,
         localizationProvider,
         searchUrlProvider,
         facetFactory,
         selectedFacetFactory,
         composerContext,
         productSearchViewModelFactory,
         categoryRepository)
 {
     SearchQueryRepository     = searchQueryRepository ?? throw new ArgumentNullException(nameof(searchQueryRepository));
     SearchQueryUrlProvider    = searchQueryUrlProvider ?? throw new ArgumentNullException(nameof(searchQueryUrlProvider));
     ProductSettingsRepository = productSettingsRepository;
     InventoryRepository       = inventoryRepository;
 }
Ejemplo n.º 3
0
        public CategoryBrowsingViewService(
            ISearchRepository searchRepository,
            IViewModelMapper viewModelMapper,
            IDamProvider damProvider,
            ILocalizationProvider localizationProvider,
            IProductUrlProvider productUrlProvider,
            ISearchUrlProvider searchUrlProvider,
            ICategoryRepository categoryRepository,
            ICategoryBrowsingUrlProvider categoryBrowsingUrlProvider,
            IFacetFactory facetFactory,
            ISelectedFacetFactory selectedFacetFactory,
            IPriceProvider priceProvider,
            IComposerContext composerContext,
            IProductSettingsViewService productSettings,
            IScopeViewService scopeViewService,
            IRecurringOrdersSettings recurringOrdersSettings)

            : base(
                searchRepository,
                viewModelMapper,
                damProvider,
                localizationProvider,
                productUrlProvider,
                searchUrlProvider,
                facetFactory,
                selectedFacetFactory,
                priceProvider,
                composerContext,
                productSettings,
                scopeViewService,
                recurringOrdersSettings)
        {
            CategoryRepository          = categoryRepository ?? throw new ArgumentNullException(nameof(categoryRepository));
            CategoryBrowsingUrlProvider = categoryBrowsingUrlProvider ?? throw new ArgumentNullException(nameof(categoryBrowsingUrlProvider));
        }
 protected BaseSearchViewService(
     ISearchRepository searchRepository,
     IViewModelMapper viewModelMapper,
     IDamProvider damProvider,
     ILocalizationProvider localizationProvider,
     IProductUrlProvider productUrlProvider,
     ISearchUrlProvider searchUrlProvider,
     IFacetFactory facetFactory,
     ISelectedFacetFactory selectedFacetFactory,
     IPriceProvider priceProvider,
     IComposerContext composerContext,
     IProductSettingsViewService productSettings,
     IScopeViewService scopeViewService,
     IRecurringOrdersSettings recurringOrdersSettings)
 {
     SearchRepository        = searchRepository ?? throw new ArgumentNullException(nameof(searchRepository));
     ViewModelMapper         = viewModelMapper ?? throw new ArgumentNullException(nameof(viewModelMapper));
     DamProvider             = damProvider ?? throw new ArgumentNullException(nameof(damProvider));
     LocalizationProvider    = localizationProvider ?? throw new ArgumentNullException(nameof(localizationProvider));
     ProductUrlProvider      = productUrlProvider ?? throw new ArgumentNullException(nameof(productUrlProvider));
     SearchUrlProvider       = searchUrlProvider ?? throw new ArgumentNullException(nameof(searchUrlProvider));
     SelectedFacetFactory    = selectedFacetFactory ?? throw new ArgumentNullException(nameof(selectedFacetFactory));
     FacetFactory            = facetFactory ?? throw new ArgumentNullException(nameof(facetFactory));
     PriceProvider           = priceProvider ?? throw new ArgumentNullException(nameof(priceProvider));
     ComposerContext         = composerContext ?? throw new ArgumentNullException(nameof(composerContext));
     ProductSettings         = productSettings ?? throw new ArgumentNullException(nameof(productSettings));
     ScopeViewService        = scopeViewService ?? throw new ArgumentNullException(nameof(scopeViewService));
     RecurringOrdersSettings = recurringOrdersSettings ?? throw new ArgumentNullException(nameof(recurringOrdersSettings));
 }
Ejemplo n.º 5
0
        public SearchQueryViewService(
            ISearchRepository searchRepository,
            IViewModelMapper viewModelMapper,
            IDamProvider damProvider,
            ILocalizationProvider localizationProvider,
            IProductUrlProvider productUrlProvider,
            ISearchUrlProvider searchUrlProvider,
            IFacetFactory facetFactory,
            ISelectedFacetFactory selectedFacetFactory,
            IPriceProvider priceProvider,
            IComposerContext composerContext,
            IProductSettingsViewService productSettings,
            IScopeViewService scopeViewService,
            ISearchQueryRepository searchQueryRepository,
            ISearchQueryUrlProvider searchQueryUrlProvider,
            IProductSettingsRepository productSettingsRepository,
            Repositories.IInventoryRepository inventoryRepository,
            IRecurringOrdersSettings recurringOrdersSettings
            )

            : base(
                searchRepository,
                viewModelMapper,
                damProvider,
                localizationProvider,
                productUrlProvider,
                searchUrlProvider,
                facetFactory,
                selectedFacetFactory,
                priceProvider,
                composerContext,
                productSettings,
                scopeViewService,
                recurringOrdersSettings)
        {
            if (searchQueryRepository == null)
            {
                throw new ArgumentNullException("searchQueryRepository");
            }
            if (searchQueryUrlProvider == null)
            {
                throw new ArgumentNullException("searchQuerySearchRepository");
            }

            SearchQueryRepository     = searchQueryRepository;
            SearchQueryUrlProvider    = searchQueryUrlProvider;
            ProductSettingsRepository = productSettingsRepository;
            InventoryRepository       = inventoryRepository;
        }
Ejemplo n.º 6
0
        public FacetFactorySet(IFacetFactory[] factories) {
            List<IFacetFactory> allFactories = factories.ToList();
            allFactories.Sort();

            Prefixes = allFactories.OfType<IMethodPrefixBasedFacetFactory>().SelectMany(prefixfactory => prefixfactory.Prefixes).ToArray();

            foreach (FeatureType featureType in Enum.GetValues(typeof (FeatureType))) {
                factoriesByFeatureType[featureType] = allFactories.Where(f => f.FeatureTypes.HasFlag(featureType)).ToList();
            }

            methodFilteringFactories = allFactories.OfType<IMethodFilteringFacetFactory>().ToList();
            propertyFilteringFactories = allFactories.OfType<IPropertyFilteringFacetFactory>().ToList();
            propertyOrCollectionIdentifyingFactories = allFactories.OfType<IPropertyOrCollectionIdentifyingFacetFactory>().ToList();
            actionIdentifyingFactories = allFactories.OfType<IMethodIdentifyingFacetFactory>().ToList();

        }
Ejemplo n.º 7
0
        internal LoaderFacetFactory(LoaderExtension extension, IFacetFactory factory, TypeDescriptor type,
                                    FacetFactoryAttribute attribute)
            : base(extension)
        {
            _facetTypeDescriptors = new Lazy <ReadOnlyCollection <TypeDescriptor> >(
                () => new ReadOnlyCollection <TypeDescriptor>(Factory.GetFacetTypes().Select(TypeDescriptor.Get).ToArray()));

            Factory        = factory;
            TypeDescriptor = type;
            Type           = type;
            Name           = attribute == null ? type.FullName : attribute.Name;
            _aliases       = new ReadOnlyCollection <string>(attribute == null ? new string[] { } : attribute.AliasesSplit);
            _isIndexed     = Factory is IFacetFactoryWithIndex;
            if (_isIndexed)
            {
                _indexingConfigurationExceptions = new List <RequiresConfigurationException>();
            }
        }
 protected BaseSearchViewService(ISearchRepository searchRepository,
                                 IDamProvider damProvider,
                                 ILocalizationProvider localizationProvider,
                                 ISearchUrlProvider searchUrlProvider,
                                 IFacetFactory facetFactory,
                                 ISelectedFacetFactory selectedFacetFactory,
                                 IComposerContext composerContext,
                                 IProductSearchViewModelFactory productSearchViewModelFactory,
                                 ICategoryRepository categoryRepository)
 {
     SearchRepository              = searchRepository ?? throw new ArgumentNullException(nameof(searchRepository));
     DamProvider                   = damProvider ?? throw new ArgumentNullException(nameof(damProvider));
     LocalizationProvider          = localizationProvider ?? throw new ArgumentNullException(nameof(localizationProvider));
     SearchUrlProvider             = searchUrlProvider ?? throw new ArgumentNullException(nameof(searchUrlProvider));
     SelectedFacetFactory          = selectedFacetFactory ?? throw new ArgumentNullException(nameof(selectedFacetFactory));
     FacetFactory                  = facetFactory ?? throw new ArgumentNullException(nameof(facetFactory));
     ComposerContext               = composerContext ?? throw new ArgumentNullException(nameof(composerContext));
     ProductSearchViewModelFactory = productSearchViewModelFactory ?? throw new ArgumentNullException(nameof(productSearchViewModelFactory));
     CategoryRepository            = categoryRepository ?? throw new ArgumentNullException(nameof(categoryRepository));
 }
Ejemplo n.º 9
0
 public SearchViewService(
     ICategoryRepository categoryRepository,
     ISearchRepository searchRepository,
     IDamProvider damProvider,
     ILocalizationProvider localizationProvider,
     ISearchUrlProvider searchUrlProvider,
     IFacetFactory facetFactory,
     ISelectedFacetFactory selectedFacetFactory,
     IComposerContext composerContext,
     IProductSearchViewModelFactory productSearchViewModelFactory)
     : base(
         searchRepository,
         damProvider,
         localizationProvider,
         searchUrlProvider,
         facetFactory,
         selectedFacetFactory,
         composerContext,
         productSearchViewModelFactory,
         categoryRepository)
 {
 }
 public int CompareTo(IFacetFactory other) {
     return NumericOrder.CompareTo(other.NumericOrder);
 }
Ejemplo n.º 11
0
 public int CompareTo(IFacetFactory other) => NumericOrder.CompareTo(other.NumericOrder);
Ejemplo n.º 12
0
 internal static LoaderFacetFactory GetFactoryInfo(IFacetFactory factory)
 {
     return(FacetFactories.Where(x => x.Factory == factory).Single());
 }
Ejemplo n.º 13
0
 public int CompareTo(IFacetFactory other)
 {
     return(NumericOrder.CompareTo(other.NumericOrder));
 }