Example #1
0
 private static void RegisterLanguageSwitchProviders(IComposerHost host)
 {
     host.Register <LanguageSwitchContext, ILanguageSwitchContext>(ComponentLifestyle.PerRequest);
     host.Register <LanguageSwitchProvider, ILanguageSwitchProvider>();
     host.Register <ProductLanguageSwitchProvider, ILanguageSwitchProvider>();
     host.Register <StoreLanguageSwitchProvider, ILanguageSwitchProvider>();
 }
        public void Register(IComposerHost host)
        {
            host.Register <ContentSearchViewService, IContentSearchViewService>(ComponentLifestyle.Transient);
            host.Register <MediaSearchDocumentBuilderExtension, ISearchDocumentBuilderExtension>(ComponentLifestyle.Singleton);

            host.RegisterApiControllers(typeof(ContentSearchPlugin).Assembly);
        }
Example #3
0
        public void Register(IComposerHost host)
        {
            host.Register <TestCookieAccessor, ICookieAccessor <TestCookieDto> >(ComponentLifestyle.PerRequest);
            host.Register <TestInventoryLocationProvider, IInventoryLocationProvider>();

            host.RegisterApiControllers(typeof(TestPlugin).Assembly);
        }
        public void Register(IComposerHost host)
        {
            host.Register <SearchQueryContext, ISearchQueryContext>();
            host.Register <SearchQueryRepository, ISearchQueryRepository>();
            host.Register <InventoryRepository, IInventoryRepository>();
            host.Register <SearchQueryViewService, ISearchQueryViewService>();

            host.MetadataRegistry.LoadViewModelMetadataInAssemblyOf(typeof(SearchPlugin).Assembly);
        }
 public void Register(IComposerHost host)
 {
     host.Register <SearchQueryContext, ISearchQueryContext>(ComponentLifestyle.PerRequest);
     host.Register <SearchQueryRepository, ISearchQueryRepository>();
     host.Register <InventoryRepository, IInventoryRepository>();
     host.Register <SearchQueryViewService, ISearchQueryViewService>();
     host.RegisterApiControllers(typeof(SearchQueryPlugin).Assembly);
     host.MetadataRegistry.LoadViewModelMetadataInAssemblyOf(typeof(SearchQueryPlugin).Assembly);
 }
        public void Register(IComposerHost host)
        {
            host.Register <MembershipViewService, IMembershipViewService>();
            host.Register <CustomerRepository, ICustomerRepository>();
            host.Register <CustomerAddressRepository, ICustomerAddressRepository>();
            host.Register <CustomerAddressViewService, ICustomerAddressViewService>();
            host.Register <CustomerViewService, ICustomerViewService>();

            host.MetadataRegistry.LoadViewModelMetadataInAssemblyOf(typeof(MyAccountPlugin).Assembly);

            host.RegisterApiControllers(typeof(MyAccountPlugin).Assembly);
        }
        private static void RegisterFacetProviders(IComposerHost host)
        {
            host.Register <IFacetProviderRegistry>(SearchConfiguration.FacetProviderRegistry);
            host.Register <FacetFactory, IFacetFactory>(ComponentLifestyle.Transient);
            host.Register <RangeFacetProvider>(ComponentLifestyle.Transient);
            host.Register <MultiSelectFacetProvider>(ComponentLifestyle.Transient);
            host.Register <SingleSelectFacetProvider>(ComponentLifestyle.Transient);

            SearchConfiguration.FacetProviderRegistry.RegisterProvider <MultiSelectFacetProvider>(
                FacetType.MultiSelect.ToString());
            SearchConfiguration.FacetProviderRegistry.RegisterProvider <RangeFacetProvider>(FacetType.Range.ToString());
            SearchConfiguration.FacetProviderRegistry.RegisterProvider <SingleSelectFacetProvider>(
                FacetType.SingleSelect.ToString());
        }
Example #8
0
        public void Register(IComposerHost host)
        {
            host.Register <SearchQueryUrlProvider, ISearchQueryUrlProvider>();

            host.RegisterApiControllers(typeof(Plugin).Assembly);
            host.RegisterControllers(typeof(Plugin).Assembly);
        }
        public void Register(IComposerHost host)
        {
            host.Register <CategoryBrowsingViewService, ICategoryBrowsingViewService>();
            host.Register <SearchViewService, ISearchViewService>();
            host.Register <SearchRepository, ISearchRepository>();
            host.Register <ProductRequestFactory, IProductRequestFactory>();
            host.Register <SearchRequestContext, ISearchRequestContext>(ComponentLifestyle.PerRequest);
            host.Register <BrowseCategoryRequestContext, IBrowseCategoryRequestContext>(ComponentLifestyle.PerRequest);
            host.Register <SearchBreadcrumbViewService, ISearchBreadcrumbViewService>();
            host.Register <FacetLocalizationProvider, IFacetLocalizationProvider>();
            host.Register <FromPriceProvider, IPriceProvider>();
            host.Register <SearchTermsTransformationProvider, ISearchTermsTransformationProvider>();

            host.MetadataRegistry.LoadViewModelMetadataInAssemblyOf(typeof(SearchPlugin).Assembly);

            host.RegisterApiControllers(typeof(SearchPlugin).Assembly);

            RegisterFacetProviders(host);
            RegisterFacetPredicateProviders(host);
            RegisterSelectedFacetProviders(host);
        }
Example #10
0
 private static void RegisterBreadcrumProviders(IComposerHost host)
 {
     host.Register <BreadcrumbContext, IBreadcrumbContext>(ComponentLifestyle.PerRequest);
     host.Register <BreadcrumbProvider, IBreadcrumbProvider>();
     host.Register <ProductBreadcrumbProvider, IBreadcrumbProvider>();
     host.Register <StoreBreadcrumbProvider, IBreadcrumbProvider>();
     host.Register <ChekoutBreadcrumbProvider, IBreadcrumbProvider>();
     host.Register <SearchBreadcrumbProvider, IBreadcrumbProvider>();
 }
Example #11
0
        public void Register(IComposerHost host)
        {
            host.Register <ComposerCookieAccessor, ICookieAccessor <ComposerCookieDto> >(ComponentLifestyle.PerRequest);
            host.Register <ComposerContext, IComposerContext>(ComponentLifestyle.PerRequest);
            host.Register <RegionCodeProvider, IRegionCodeProvider>();
            //host.Register<ScopeProvider, IScopeProvider>();
            host.Register <CountryRepository, ICountryRepository>();
            host.Register <CountryService, ICountryService>();
            host.Register <CategoryRepository, ICategoryRepository>();
            host.Register <LookupRepositoryFactory, ILookupRepositoryFactory>();
            host.Register <LookupService, ILookupService>();
            host.Register <AddressRepository, IAddressRepository>();
            host.Register <FulfillmentLocationsRepository, IFulfillmentLocationsRepository>();
            host.Register <ProductSettingsRepository, IProductSettingsRepository>();
            host.Register <ProductSettingsViewService, IProductSettingsViewService>();
            host.Register <ScopeRepository, IScopeRepository>();
            host.Register <ScopeViewService, IScopeViewService>();
            host.Register <InventoryRepository, IInventoryRepository>();
            host.Register <ImageService, IImageService>();
            host.Register <CurrencyProvider, ICurrencyProvider>();
            host.Register <RecurringOrdersRepository, IRecurringOrdersRepository>();
            host.Register <RecurringOrderTemplatesViewService, IRecurringOrderTemplatesViewService>();
            host.Register <RecurringOrderTemplateViewModelFactory, IRecurringOrderTemplateViewModelFactory>();
            host.Register <RecurringOrderProgramViewModelFactory, IRecurringOrderProgramViewModelFactory>();
            host.Register <ProductPriceViewService, IProductPriceViewService>();
            host.Register <ProductRepository, IProductRepository>();
            host.Register <RegexRulesProvider, IRegexRulesProvider>();

            host.MetadataRegistry.LoadViewModelMetadataInAssemblyOf(GetType().Assembly);

            host.RegisterControllers(GetType().Assembly);
            host.RegisterApiControllers(GetType().Assembly);

            RegisterSpecializedRoutes(RouteTable.Routes);

            host.Initialized += HostOnInitialized;
        }
Example #12
0
        /// <summary>
        /// Autowireup this plugin
        /// </summary>
        /// <param name="host"></param>
        public void Register(IComposerHost host)
        {
            host.Register <CartService, ICartService>();
            host.Register <CouponViewService, ICouponViewService>();
            host.Register <CartRepository, ICartRepository>();
            host.Register <CheckoutService, ICheckoutService>();
            host.Register <FulfillmentMethodRepository, IFulfillmentMethodRepository>();
            host.Register <CartViewModelFactory, ICartViewModelFactory>();
            host.Register <ShippingMethodViewService, IShippingMethodViewService>();
            host.Register <FulfillmentMethodRepository, IFulfillmentMethodRepository>();
            host.Register <PaymentViewService, IPaymentViewService>();
            host.Register <PaymentRepository, IPaymentRepository>();
            host.Register <CheckoutBreadcrumbViewService, ICheckoutBreadcrumbViewService>();
            host.Register <VaultProfileRepository, IVaultProfileRepository>();
            host.Register <VaultProfileViewService, IVaultProfileViewService>();

            host.Register <OrderRepository, IOrderRepository>();
            host.Register <OrderHistoryViewService, IOrderHistoryViewService>();
            host.Register <OrderHistoryViewModelFactory, IOrderHistoryViewModelFactory>();
            host.Register <FindOrdersRequestFactory, IFindOrdersRequestFactory>();
            host.Register <OrderDetailsViewModelFactory, IOrderDetailsViewModelFactory>();
            host.Register <LineItemService, ILineItemService>();
            host.Register <TaxViewModelFactory, ITaxViewModelFactory>();
            host.Register <LineItemViewModelFactory, ILineItemViewModelFactory>();
            host.Register <RewardViewModelFactory, IRewardViewModelFactory>();
            host.Register <FixCartService, IFixCartService>();

            host.Register <CartMergeProvider, ICartMergeProvider>();
            host.Register <SurfacedErrorLineItemValidationProvider, ILineItemValidationProvider>();

            host.Register <WishListViewService, IWishListViewService>();
            host.Register <WishListRepository, IWishListRepository>();

            host.Register <RecurringOrderCartViewModelFactory, IRecurringOrderCartViewModelFactory>();
            host.Register <RecurringOrderCartsViewService, IRecurringOrderCartsViewService>();

            host.MetadataRegistry.LoadViewModelMetadataInAssemblyOf(typeof(CartPlugin).Assembly);

            host.RegisterApiControllers(typeof(CartPlugin).Assembly);

            RegisterPaymentProviders(host);
            RegisterShippingTrackingProviders(host);
        }
        public void Register(IComposerHost host)
        {
            host.Register <ProductViewService, IProductViewService>();
            host.Register <RelationshipRepository, IRelationshipRepository>();
            host.Register <CategoryViewService, ICategoryViewService>();
            host.Register <ConventionBasedDamProvider, IDamProvider>();
            host.Register <ProductBreadcrumbService, IProductBreadcrumbService>();
            host.Register <ProductSpecificationsViewService, IProductSpecificationsViewService>();
            host.Register <ProductViewModelFactory, IProductViewModelFactory>();
            host.Register <RelatedProductViewService, IRelatedProductViewService>();
            host.Register <InventoryViewService, IInventoryViewService>();
            host.Register <ConfigurationInventoryLocationProvider, IInventoryLocationProvider>();
            host.Register <ProductMediaSettingsRepository, IProductMediaSettingsRepository>(ComponentLifestyle.Singleton);

            host.MetadataRegistry.LoadViewModelMetadataInAssemblyOf(typeof(ProductPlugin).Assembly);

            host.RegisterApiControllers(typeof(ProductPlugin).Assembly);
        }
Example #14
0
        private void RegisterDependencies(IComposerHost host)
        {
            host.Register <RecurringOrdersSettings, IRecurringOrdersSettings>(ComponentLifestyle.PerRequest);
            host.Register <GoogleSettings, IGoogleSettings>(ComponentLifestyle.PerRequest);
            host.Register <WebsiteContext, IWebsiteContext>(ComponentLifestyle.PerRequest);
            host.Register <EmptyFulfillmentContext, IFulfillmentContext>(ComponentLifestyle.Singleton);
            host.Register <AntiCookieTamperingExcluder, IAntiCookieTamperingExcluder>();
            host.Register <Providers.ScopeProvider, IScopeProvider>(ComponentLifestyle.PerRequest);
            host.Register <Providers.ProductUrlProvider, IProductUrlProvider>(ComponentLifestyle.PerRequest);
            host.Register <Providers.CountryCodeProvider, ICountryCodeProvider>(ComponentLifestyle.PerRequest);
            host.Register <FacetConfigurationContext, IFacetConfigurationContext>(ComponentLifestyle.PerRequest);
            host.Register <CategoryMetaContext, ICategoryMetaContext>(ComponentLifestyle.PerRequest);
            host.Register <PageService, IPageService>();
            host.Register <CultureService, ICultureService>(ComponentLifestyle.Singleton);
            host.Register <GoogleAnalyticsNavigationUrlProvider>();
            host.Register <NavigationMapper, INavigationMapper>();

            host.Register <SearchUrlProvider, ISearchUrlProvider>();
            host.Register <CategoryBrowsingUrlProvider, ICategoryBrowsingUrlProvider>();
            host.Register <CartUrlProvider, ICartUrlProvider>();
            host.Register <MyAccountUrlProvider, IMyAccountUrlProvider>();
            host.Register <WishListUrlProvider, IWishListUrlProvider>();
            host.Register <RecurringScheduleUrlProvider, IRecurringScheduleUrlProvider>();
            host.Register <RecurringCartUrlProvider, IRecurringCartUrlProvider>();
            host.Register <CategoryPageService, ICategoryBrowsingService>();
            host.Register <ImageViewService, IImageViewService>();
            host.Register <MediaService, IMediaService>();
            host.Register <OrderUrlProvider, IOrderUrlProvider>();
            host.Register <Providers.StoreUrlProvider, IStoreUrlProvider>();
            host.Register <LanguageSwitchViewService, ILanguageSwitchService>();
            host.Register <BreadcrumbViewService, IBreadcrumbViewService>();
            // TODO: Why not done in Composer directly ??
            host.Register <SettingsFromConfigFileService, ISettingsService>();
            host.Register <MyAccountViewService, IMyAccountViewService>();
            host.Register <PageNotFoundUrlProvider, IPageNotFoundUrlProvider>();
            host.Register <C1PerformanceDataCollector, IPerformanceDataCollector>();
            host.Register <DataQueryService, IDataQueryService>();
            host.Register <SiteConfiguration, ISiteConfiguration>(ComponentLifestyle.Singleton);
            host.Register <CookieAccesserSettings, ICookieAccesserSettings>(ComponentLifestyle.Singleton);
            host.Register <CdnDamProviderSettings, ICdnDamProviderSettings>(ComponentLifestyle.Singleton);
            host.Register <CacheService, ICacheService>(ComponentLifestyle.Singleton);
            host.Register <PreviewModeService, IPreviewModeService>();
            host.Register <AutocompleteProvider, IAutocompleteProvider>();
            host.Register <Scheduler, IScheduler>(ComponentLifestyle.Singleton);

            host.Register <ProductContext, IProductContext>(ComponentLifestyle.PerRequest);
            host.Register <StoreContext, IStoreContext>(ComponentLifestyle.PerRequest);
            host.Register <LazyFunctionCallDataProvider, ILazyFunctionCallDataProvider>();
            host.Register <BaseSearchCriteriaProvider, IBaseSearchCriteriaProvider>();

            host.Register <EditingOrderProvider, IEditingOrderProvider>();
            RegisterBreadcrumProviders(host);
            RegisterLanguageSwitchProviders(host);

            host.RegisterApiControllers(typeof(Plugin).Assembly);
        }
 public void Register(IComposerHost host)
 {
     host.Register <GoogleMapsUrlProvider, IGoogleMapsUrlProvider>();
     host.Register <StoreViewService, IStoreViewService>();
     host.Register <StoreScheduleViewService, IStoreScheduleViewService>();
     host.Register <StoreLocatorViewService, IStoreLocatorViewService>();
     host.Register <StoreRepository, IStoreRepository>();
     host.Register <StoreViewModelFactory, IStoreViewModelFactory>();
     host.Register <StoreDirectoryViewService, IStoreDirectoryViewService>();
     host.Register <StoreInventoryViewService, IStoreInventoryViewService>();
     host.Register <StoreScheduleProvider, IStoreScheduleProvider>();
     host.Register <MapClustererProvider, IMapClustererProvider>();
     host.Register <MapConfigurationViewService, IMapConfigurationViewService>();
     host.MetadataRegistry.LoadViewModelMetadataInAssemblyOf(typeof(StorePlugin).Assembly);
     host.RegisterApiControllers(typeof(StorePlugin).Assembly);
 }