public void ConfigureContainer(ServiceConfigurationContext context) { _services = context.Services; context.ConfigureFoundationCms(); _services.Configure <ContentApiConfiguration>(c => { c.EnablePreviewFeatures = true; c.Default().SetMinimumRoles(string.Empty).SetRequiredRole(string.Empty); }); _services.Configure <ContentApiSearchConfiguration>(config => { config.Default() .SetMaximumSearchResults(200) .SetSearchCacheDuration(TimeSpan.FromMinutes(60)); }); _services.AddSingleton <IDisplayModeFallbackProvider, FoundationDisplayModeProvider>(); _services.AddTransient <IQuickNavigatorItemProvider, FoundationQuickNavigatorItemProvider>(); _services.AddTransient <IViewTemplateModelRegistrator, ViewTemplateModelRegistrator>(); _services.AddSingleton <IHeaderViewModelFactory, HeaderViewModelFactory>(); _services.AddSingleton <BlogTagFactory>(); _services.AddSingleton <ISearchService, SearchService>(); _services.AddSingleton <ISearchViewModelFactory, SearchViewModelFactory>(); _services.AddSingleton <IModelBinderProvider, FindModelBinderProvider>(); _services.AddTransient <IContentQuery, LandingPagesSlice>(); _services.AddTransient <IContentSlice, LandingPagesSlice>(); _services.AddTransient <IContentQuery, StandardPagesSlice>(); _services.AddTransient <IContentSlice, StandardPagesSlice>(); _services.AddTransient <IContentQuery, BlogsSlice>(); _services.AddTransient <IContentSlice, BlogsSlice>(); _services.AddTransient <IContentQuery, BlocksSlice>(); _services.AddTransient <IContentSlice, BlocksSlice>(); _services.AddTransient <IContentQuery, MediaSlice>(); _services.AddTransient <IContentSlice, MediaSlice>(); _services.AddTransient <IContentQuery, ImagesSlice>(); _services.AddTransient <IContentSlice, ImagesSlice>(); _services.AddTransient <IContentQuery, EverythingSlice>(); _services.AddTransient <IContentSlice, EverythingSlice>(); _services.AddTransient <IContentQuery, MyContentSlice>(); _services.AddTransient <IContentSlice, MyContentSlice>(); _services.AddTransient <IContentQuery, MyPagesSlice>(); _services.AddTransient <IContentSlice, MyPagesSlice>(); _services.AddTransient <IContentQuery, UnusedMediaSlice>(); _services.AddTransient <IContentSlice, UnusedMediaSlice>(); _services.AddTransient <IContentQuery, UnusedBlocksSlice>(); _services.AddTransient <IContentSlice, UnusedBlocksSlice>(); _services.AddSingleton <ISchemaDataMapper <BlogItemPage>, BlogItemPageSchemaMapper>(); _services.AddSingleton <ISchemaDataMapper <HomePage>, HomePageSchemaMapper>(); _services.AddSingleton <ISchemaDataMapper <LocationItemPage>, LocationItemPageSchemaDataMapper>(); // Foundation.Features.Shared _services.AddSingleton <IMailService, MailService>(); _services.AddSingleton <IHtmlDownloader, HtmlDownloader>(); }
public void ConfigureContainer(ServiceConfigurationContext context) { context.ConfigureFoundationCms(); context.Services.Configure <ContentApiConfiguration>(config => { config.Default() .SetMinimumRoles(string.Empty); }); context.Services.Configure <ContentApiSearchConfiguration>(config => { config.Default() .SetMaximumSearchResults(200) .SetSearchCacheDuration(TimeSpan.FromMinutes(60)); }); context.Services.AddSingleton <ICampaignService, CampaignService>(); }
public void ConfigureContainer(ServiceConfigurationContext context) { context.ConfigureFoundationCms(); context.Services.Configure <ContentApiConfiguration>(c => { c.EnablePreviewFeatures = true; c.Default(RestVersion.Version_3_0) .SetMinimumRoles(string.Empty) .SetRequiredRole(string.Empty); c.Default(RestVersion.Version_2_0) .SetMinimumRoles(string.Empty) .SetRequiredRole(string.Empty); }); context.Services.Configure <ContentApiSearchConfiguration>(config => { config.Default() .SetMaximumSearchResults(200) .SetSearchCacheDuration(TimeSpan.FromMinutes(60)); }); }
public void ConfigureContainer(ServiceConfigurationContext context) { _services = context.Services; context.ConfigureFoundationCms(); _services.Configure <ContentApiConfiguration>(c => { c.EnablePreviewFeatures = true; c.Default().SetMinimumRoles(string.Empty).SetRequiredRole(string.Empty); }); _services.Configure <ContentApiSearchConfiguration>(config => { config.Default() .SetMaximumSearchResults(200) .SetSearchCacheDuration(TimeSpan.FromMinutes(60)); }); _services.AddSingleton <IDisplayModeFallbackProvider, FoundationDisplayModeProvider>(); _services.AddTransient <IQuickNavigatorItemProvider, FoundationQuickNavigatorItemProvider>(); _services.AddTransient <IViewTemplateModelRegistrator, ViewTemplateModelRegistrator>(); _services.AddSingleton <DefaultPlacedPriceProcessor, FoundationPlacedPriceProcessor>(); _services.AddSingleton <ISearchViewModelFactory, SearchViewModelFactory>(); _services.AddSingleton <IPaymentService, PaymentService>(); _services.AddTransient <CheckoutViewModelFactory>(); _services.AddSingleton <MultiShipmentViewModelFactory>(); _services.AddSingleton <OrderSummaryViewModelFactory>(); _services.AddTransient <PaymentMethodViewModelFactory>(); _services.AddSingleton <IBookmarksService, BookmarksService>(); _services.AddSingleton <IPricingService, PricingService>(); _services.AddSingleton <IB2BNavigationService, B2BNavigationService>(); _services.AddSingleton <IBudgetService, BudgetService>(); _services.AddSingleton <ICreditCardService, CreditCardService>(); _services.AddSingleton <IGiftCardService, GiftCardService>(); _services.AddSingleton <IOrganizationService, OrganizationService>(); _services.AddSingleton <IQuickOrderService, QuickOrderService>(); _services.AddSingleton <IProductService, ProductService>(); _services.AddSingleton <IPromotionService, PromotionService>(); _services.AddSingleton <IStoreService, StoreService>(); _services.AddSingleton <CatalogEntryViewModelFactory>(); _services.AddSingleton <IHeaderViewModelFactory, HeaderViewModelFactory>(); _services.AddSingleton <IAddressBookService, AddressBookService>(); _services.AddSingleton <CartItemViewModelFactory>(); _services.AddSingleton <ICartService, CartService>(); _services.AddSingleton <CartViewModelFactory>(); _services.AddSingleton <IOrdersService, OrdersService>(); _services.AddSingleton <ShipmentViewModelFactory>(); _services.AddSingleton <IShippingService, ShippingService>(); _services.AddSingleton <ICampaignService, CampaignService>(); _services.AddSingleton <IHtmlDownloader, HtmlDownloader>(); _services.AddTransient <IMailService, MailService>(); _services.AddSingleton <BlogTagFactory>(); _services.AddTransient <IPaymentMethod, BudgetPaymentOption>(); _services.AddTransient <IPaymentMethod, CashOnDeliveryPaymentOption>(); _services.AddTransient <IPaymentMethod, GenericCreditCardPaymentOption>(); _services.AddTransient <IPaymentMethod, GiftCardPaymentOption>(); _services.AddSingleton <ISearchService, SearchService>(); _services.AddSingleton <CatalogContentClientConventions, FoundationFindConventions>(); _services.AddSingleton <CatalogContentEventListener, FoundationCatalogContentEventListener>(); _services.AddSingleton <IModelBinderProvider, FilterOptionModelBinderProvider>(); _services.AddSingleton <IModelBinderProvider, PaymentModelBinderProvider>(); _services.AddTransient <IContentQuery, LandingPagesSlice>(); _services.AddTransient <IContentSlice, LandingPagesSlice>(); _services.AddTransient <IContentQuery, StandardPagesSlice>(); _services.AddTransient <IContentSlice, StandardPagesSlice>(); _services.AddTransient <IContentQuery, BlogsSlice>(); _services.AddTransient <IContentSlice, BlogsSlice>(); _services.AddTransient <IContentQuery, BlocksSlice>(); _services.AddTransient <IContentSlice, BlocksSlice>(); _services.AddTransient <IContentQuery, MediaSlice>(); _services.AddTransient <IContentSlice, MediaSlice>(); _services.AddTransient <IContentQuery, ImagesSlice>(); _services.AddTransient <IContentSlice, ImagesSlice>(); _services.AddTransient <IContentQuery, EverythingSlice>(); _services.AddTransient <IContentSlice, EverythingSlice>(); _services.AddTransient <IContentQuery, MyContentSlice>(); _services.AddTransient <IContentSlice, MyContentSlice>(); _services.AddTransient <IContentQuery, MyPagesSlice>(); _services.AddTransient <IContentSlice, MyPagesSlice>(); _services.AddTransient <IContentQuery, UnusedMediaSlice>(); _services.AddTransient <IContentSlice, UnusedMediaSlice>(); _services.AddTransient <IContentQuery, UnusedBlocksSlice>(); _services.AddTransient <IContentSlice, UnusedBlocksSlice>(); _services.AddTransient <IContentQuery, ProductsSlice>(); _services.AddTransient <IContentSlice, ProductsSlice>(); _services.AddTransient <IContentQuery, PackagesSlice>(); _services.AddTransient <IContentSlice, PackagesSlice>(); _services.AddTransient <IContentQuery, BundlesSlice>(); _services.AddTransient <IContentSlice, BundlesSlice>(); _services.AddTransient <IContentQuery, VariantsSlice>(); _services.AddTransient <IContentSlice, VariantsSlice>(); _services.AddTransient <IContentQuery, OrderPromotionsSlice>(); _services.AddTransient <IContentSlice, OrderPromotionsSlice>(); _services.AddTransient <IContentQuery, ShippingPromotionsSlice>(); _services.AddTransient <IContentSlice, ShippingPromotionsSlice>(); _services.AddTransient <IContentQuery, EntryPromotionsSlice>(); _services.AddTransient <IContentSlice, EntryPromotionsSlice>(); _services.AddSingleton <ISchemaDataMapper <BlogItemPage>, BlogItemPageSchemaMapper>(); _services.AddSingleton <ISchemaDataMapper <HomePage>, HomePageSchemaMapper>(); _services.AddSingleton <ISchemaDataMapper <GenericProduct>, GenericProductSchemaDataMapper>(); _services.AddSingleton <ISchemaDataMapper <LocationItemPage>, LocationItemPageSchemaDataMapper>(); }