public SearchQueryController(
     IComposerContext composerContext,
     ISearchQueryViewService searchQueryViewService,
     ISearchUrlProvider searchUrlProvider,
     IBaseSearchCriteriaProvider baseSearchCriteriaProvider)
 {
     ComposerContext            = composerContext ?? throw new ArgumentNullException(nameof(composerContext));
     SearchQueryViewService     = searchQueryViewService ?? throw new ArgumentNullException(nameof(searchQueryViewService));
     SearchUrlProvider          = searchUrlProvider ?? throw new ArgumentNullException(nameof(searchUrlProvider));
     BaseSearchCriteriaProvider = baseSearchCriteriaProvider ?? throw new ArgumentNullException(nameof(baseSearchCriteriaProvider));
 }
Esempio n. 2
0
        public SearchRequestContext(
            ISearchViewService searchViewService,
            ISearchUrlProvider searchUrlProvider,
            HttpRequestBase request,
            IBaseSearchCriteriaProvider baseSearchCriteriaProvider)
        {
            SearchViewService          = searchViewService ?? throw new ArgumentNullException(nameof(searchViewService));
            SearchUrlProvider          = searchUrlProvider ?? throw new ArgumentNullException(nameof(searchUrlProvider));
            Request                    = request;
            BaseSearchCriteriaProvider = baseSearchCriteriaProvider ?? throw new ArgumentNullException(nameof(baseSearchCriteriaProvider));

            _viewModel = new Lazy <SearchViewModel>(() =>
            {
                var criteria = BuildProductsSearchCriteria();
                return(SearchViewService.GetSearchViewModelAsync(criteria).Result);
            });
        }
Esempio n. 3
0
 public SearchController(
     IComposerContext composerContext,
     ISearchViewService searchViewService,
     IInventoryLocationProvider inventoryLocationProvider,
     ISearchTermsTransformationProvider searchTermsTransformationProvider,
     IAutocompleteProvider autocompleteProvider,
     ISearchUrlProvider searchUrlProvider,
     ICategoryBrowsingViewService categoryBrowsingViewService,
     IBaseSearchCriteriaProvider baseSearchCriteriaProvider,
     ICategoryBrowsingUrlProvider categoryBrowsingUrlProvider)
 {
     ComposerContext                   = composerContext ?? throw new ArgumentNullException(nameof(composerContext));
     SearchViewService                 = searchViewService ?? throw new ArgumentNullException(nameof(searchViewService));
     CategoryBrowsingViewService       = categoryBrowsingViewService ?? throw new ArgumentNullException(nameof(categoryBrowsingViewService));
     InventoryLocationProvider         = inventoryLocationProvider ?? throw new ArgumentNullException(nameof(inventoryLocationProvider));
     SearchTermsTransformationProvider = searchTermsTransformationProvider ?? throw new ArgumentNullException(nameof(searchTermsTransformationProvider));
     AutocompleteProvider              = autocompleteProvider ?? throw new ArgumentNullException(nameof(autocompleteProvider));
     SearchUrlProvider                 = searchUrlProvider ?? throw new ArgumentNullException(nameof(searchUrlProvider));
     BaseSearchCriteriaProvider        = baseSearchCriteriaProvider ?? throw new ArgumentNullException(nameof(baseSearchCriteriaProvider));
     CategoryBrowsingUrlProvider       = categoryBrowsingUrlProvider ?? throw new ArgumentNullException(nameof(categoryBrowsingUrlProvider));
 }