Ejemplo n.º 1
0
        public void Register(IComposerHost host)
        {
            host.Register <ContentSearchViewService, IContentSearchViewService>(ComponentLifestyle.Transient);
            host.Register <MediaSearchDocumentBuilderExtension, ISearchDocumentBuilderExtension>(ComponentLifestyle.Singleton);

            host.RegisterApiControllers(typeof(ContentSearchPlugin).Assembly);
        }
Ejemplo n.º 2
0
        public void Register(IComposerHost host)
        {
            host.Register <SearchQueryUrlProvider, ISearchQueryUrlProvider>();

            host.RegisterApiControllers(typeof(Plugin).Assembly);
            host.RegisterControllers(typeof(Plugin).Assembly);
        }
Ejemplo n.º 3
0
        public void Register(IComposerHost host)
        {
            host.Register <TestCookieAccessor, ICookieAccessor <TestCookieDto> >(ComponentLifestyle.PerRequest);
            host.Register <TestInventoryLocationProvider, IInventoryLocationProvider>();

            host.RegisterApiControllers(typeof(TestPlugin).Assembly);
        }
Ejemplo n.º 4
0
 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);
 }
Ejemplo n.º 5
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);
        }
Ejemplo n.º 6
0
        public void Register(IComposerHost host)
        {
            ComposerConfig.RegisterConfigurations();

            host.RegisterControllers(GetType().Assembly);
            host.RegisterApiControllers(GetType().Assembly);
            host.RegisterExceptionFiltersForApiControllers(typeof(AggregatedComposerExceptionFilter), typeof(ComposerExceptionFilter));
            host.MetadataRegistry.LoadViewModelMetadataInAssemblyOf(GetType().Assembly);
            RegisterPaymentProviders();
        }
Ejemplo n.º 7
0
        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);
        }
Ejemplo n.º 8
0
 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);
 }
        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);
        }
Ejemplo n.º 10
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 <CheckoutNavigationViewService, ICheckoutNavigationViewService>();

            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);
        }
Ejemplo n.º 11
0
        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);
        }
Ejemplo n.º 12
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;
        }