Beispiel #1
0
        public void Register(IComposerHost host)
        {
            host.Register <SearchQueryUrlProvider, ISearchQueryUrlProvider>();

            host.RegisterApiControllers(typeof(Plugin).Assembly);
            host.RegisterControllers(typeof(Plugin).Assembly);
        }
Beispiel #2
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();
        }
Beispiel #3
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;
        }