Exemplo n.º 1
0
 public CatalogController(ICatalogService catalogSvc, ICatalogAIService catalogAIService,
                          IProductSearchImageBasedService productSearchImageService, IOptionsSnapshot <AppSettings> settings)
 {
     _catalogSvc   = catalogSvc;
     _catalogAISvc = catalogAIService;
     _productImageSearchService = productSearchImageService;
     this.settings = settings;
 }
Exemplo n.º 2
0
        public CatalogDialog(ICatalogAIService catalogAIService, ICatalogService catalogService, IDialogFactory dialogFactory) : base(Id)
        {
            this.catalogAIService = catalogAIService;
            this.catalogService   = catalogService;

            //this.Dialogs.AddCatalogFilterDialog(dialogFactory);
            this.Dialogs.Add(Id, new WaterfallStep[] {
                ShowProductCarouselStep, ProcessNextStep
            });
        }
Exemplo n.º 3
0
 public CatalogDialog(IDialogFactory dialogFactory, IBasketService basketService,
                      ICatalogService catalogService, ICatalogAIService catalogAIService,
                      IIdentityService identityService, IProductSearchImageService productSearchImageService)
 {
     this.dialogFactory             = dialogFactory;
     this.catalogService            = catalogService;
     this.basketService             = basketService;
     this.catalogAIService          = catalogAIService;
     this.identityService           = identityService;
     this.productSearchImageService = productSearchImageService;
 }
Exemplo n.º 4
0
 public DialogFactory(ICatalogService catalogService, IBasketService basketService,
                      ICatalogAIService catalogAIService, IProductSearchImageService productSearchImageService,
                      IOrderingService orderingService, IOIDCClient oidcClient,
                      IIdentityService identityService, BotSettings botSettings)
 {
     this.catalogService            = catalogService;
     this.basketService             = basketService;
     this.catalogAIService          = catalogAIService;
     this.productSearchImageService = productSearchImageService;
     this.orderingService           = orderingService;
     this.oidcClient      = oidcClient;
     this.identityService = identityService;
     this.botSettings     = botSettings;
 }
Exemplo n.º 5
0
        private async Task <Models.Catalog.Catalog> GetProducts(CatalogFilterData ci, ICatalogAIService catalogAIService, ICatalogService catalogService)
        {
            int?brandId = -1;

            if (!string.IsNullOrEmpty(ci.Brand))
            {
                var brands = await catalogService.GetBrandsAsync();

                brandId = Convert.ToInt32(brands.FirstOrDefault(b => b.Text.Equals(ci.Brand, StringComparison.InvariantCultureIgnoreCase))?.Id);
            }
            if (brandId < 1)
            {
                brandId = null;
            }

            int?typeId = -1;

            if (!string.IsNullOrEmpty(ci.Type))
            {
                var types = await catalogService.GetTypesAsync();

                typeId = Convert.ToInt32(types.FirstOrDefault(b => b.Text.Equals(ci.Type, StringComparison.InvariantCultureIgnoreCase))?.Id);
            }
            if (typeId < 1)
            {
                typeId = null;
            }

            var products =
                ci.Tags != null && !ci.Tags.Any() ?
                Models.Catalog.Catalog.Empty :
                await catalogAIService.GetCatalogItems(ci.PageIndex, CatalogFilterData.PageSize, brandId, typeId, ci.Tags);

            return(products);
        }
Exemplo n.º 6
0
 public RecommendationList(ICatalogAIService catalogAIService, IProductRecommenderService productRecommenderService)
 {
     _catalogAIService          = catalogAIService;
     _productRecommenderService = productRecommenderService;
 }
Exemplo n.º 7
0
 public DialogFactory(IOptions <AppSettings> appSettings, ICatalogService catalogService, ICatalogAIService catalogAIService,
                      ICatalogFilterDialogService catalogFilterDialogService)
 {
     this.appSettings                = appSettings;
     this.catalogService             = catalogService;
     this.catalogAIService           = catalogAIService;
     this.catalogFilterDialogService = catalogFilterDialogService;
 }