public void Compose(Composition composition) { var propertyEditorComposerType = typeof(UmbracoHelper).Assembly.GetType("Umbraco.Web.PropertyEditors.PropertyEditorsComposer", false); if (propertyEditorComposerType == null) { return; } var runtimeLevel = propertyEditorComposerType.GetCustomAttribute <RuntimeLevelAttribute>(); if (runtimeLevel == null) { return; } // This is the default in <= 8.6 which means we don't get event binding // which is why we have this work around, if this is changed in future versions we'll assume we don't have to do the work around below if (runtimeLevel.MinLevel != Core.RuntimeLevel.Run) { return; } var propertyEditorComponentType = typeof(UmbracoHelper).Assembly.GetType("Umbraco.Web.PropertyEditors.PropertyEditorsComponent", false); if (propertyEditorComponentType == null) { return; } composition.Components().Append <StarterKitInstallComponent>(); // manually add this because the normal umbraco composer won't because it's run level is too low composition.Components().Append(propertyEditorComponentType); }
public void Compose(Composition composition) { // Append our component to the collection of Components // It will be the last one to be run composition.Components().Append <InitialiseContentCreationComponent>(); composition.Components().Append <ClearCacheComponent>(); }
public void Compose(Composition composition) { // Composer and Components Tutorial composition.Register <ScopedExample>(Lifetime.Scope); composition.Register <RequestExample>(Lifetime.Request); composition.Register <TransientExample>(Lifetime.Transient); composition.Register <SingltonExample>(Lifetime.Singleton); // Dependency Injection composition.Register <ISettingsService, SettingsService>(Lifetime.Singleton); // Controllers composition.Register <BLockController>(Lifetime.Request); composition.Register <DiController>(Lifetime.Request); composition.Register <SharedPartialController>(); // Components composition.Components().Append <RouteTableComponent>(); composition.Components().Append <ComponentOne>(); // composition.Components().Append<ReoccurringTasks>(); // Content Apps // Content ContentFinders composition.ContentFinders(); // Dashboards composition.Dashboards(); // Data Editors composition.DataEditors(); }
/// <summary> /// Method to add custom implemented components which implements IComponent /// </summary> private void AddComponents(Composition composition) { composition.Components().Append <ApiConfigurationComponent>(); composition.Components().Append <SearchConfigurationComponent>(); composition.Components().Append <HtmlMinifierComponent>(); //composition.Components().Append<CustomDropDownPopulateComponent>(); }
public void Compose(Composition composition) { //routing composition.Components().Append <CustomRoutes>(); //umbraco events composition.Components().Append <ContentServiceEvents>(); composition.Components().Append <ContentTypeServiceEvents>(); //services composition.Register <IPagingHelper, PagingHelper>(); composition.Register <IPluralizationServiceWrapper, PluralizationServiceWrapper>(); composition.Register <IEmbeddedContentService, EmbeddedContentService>(); composition.Register(f => Current.AppCaches.RuntimeCache); //controllers composition.Register(f => { var s = f.GetInstance <IEmbeddedContentService>(); return(new BentoApiController(s)); }, Lifetime.Request); //content apps composition.ContentApps().Append <RelationshipManager>(); }
public void Compose(Composition composition) { //Append our component to the collection of Components // It will be the last one to be run composition.Components().Append <InitializePlan>(); composition.Components().Append <EventBlocker>(); composition.Register <MediaProtectorApiController>(); }
public void Compose(Composition composition) { composition.SetDefaultRenderMvcController <USNBaseController>(); composition.Components().Append <USNExamineEvents>(); composition.Components().Append <USNSubscribeToContentService>(); composition.Sections().Append <USNSection>(); composition.Sections().InsertBefore <PackagesSection, USNSection>(); }
public void Compose(Composition composition) { // component for startup composition.Components().Append <TwoFactorMigrationComponent>(); composition.Components().Append <TwoFactorEventHandler>(); composition.Register <TwoFactorService>(); }
/// <inheritdoc /> public void Compose(Composition composition) { composition.Register <IEntityParsingService, NexuEntityParsingService>(); composition.Register <IRelationRepository, NexuRelationRepository>(); composition.Register <IEntityRelationService, NexuEntityRelationService>(); composition.Components().Append <MigrationComponent>(); composition.Components().Append <ContentServiceEventsComponent>(); }
public void Compose(Composition composition) { composition.WithCollectionBuilder <MapDefinitionCollectionBuilder>() .Add <MemberListItemMapDefinition>(); composition.Components().Append <MemberListViewComponent>(); composition.Components().Append <MemberIndexingComponent>(); composition.Register <IMemberExtendedService, MemberExtendedService>(); }
public void Compose(Composition composition) { composition.Register <IConfiguration, Configuration.Configuration>(Lifetime.Singleton); composition.Components().Append <AttributeRoutingComponent>(); // Controllers composition.Register <TestController>(Lifetime.Request); composition.Components().Append <RouteTableComponent>(); composition.Components().Append <BundleConfigComponent>(); composition.Components().Append <FilterConfigComponent>(); }
public void Compose(Composition composition) { // Content Node Icon Service composition.Register <IContentNodeIconsService, ContentNodeIconsService>(); // Listener for Tree Events composition.Components().Append <TreeEvents>(); // Listener for Content Events //composition.Components().Append<ContentEvents>(); // Database Migration composition.Components().Append <ContentNodeIconsComponent>(); }
public void Compose(Composition composition) { composition.Register <IStaticSiteStorer, AppDataSiteStorer>(); composition.Register <IImageCropNameGenerator, ImageCropNameGenerator>(); composition.Register <StaticHtmlSiteGenerator>(); composition.Register <JsonApiGenerator>(); composition.Register <IDeployerFactory, AppPluginsJsonDeployerFactory>(); composition.Register <IExportTypeSettings, AppPluginsJsonExportTypeSettings>(); composition.Register <SitesRepository>(); composition.Components().Append <XStaticDatabaseComponent>(); composition.Components().Append <XStaticOnPublishAutoDeployComponent>(); }
public void Compose(Composition composition) { if (!(bool.Parse(ConfigurationManager.AppSettings["Our.Umbraco.AutoImageOptimze:Disabled"] ?? "false"))) { composition.Components().Append <Our.Umbraco.AutoImageOptimze.ImageProccessingComponent>(); } }
public void Compose(Composition composition) { // Replace the product information extractor with one that supports child variants composition.RegisterUnique <IProductAdapter, CompositeNameUmbracoProductAdapter>(); // Register event handlers composition.WithNotificationEvent <OrderProductAddingNotification>() .RegisterHandler <OrderProductAddingHandler>(); composition.WithNotificationEvent <OrderLineChangingNotification>() .RegisterHandler <OrderLineChangingHandler>(); composition.WithNotificationEvent <OrderLineRemovingNotification>() .RegisterHandler <OrderLineRemovingHandler>(); composition.WithNotificationEvent <OrderPaymentCountryRegionChangingNotification>() .RegisterHandler <OrderPaymentCountryRegionChangingHandler>(); composition.WithNotificationEvent <OrderShippingCountryRegionChangingNotification>() .RegisterHandler <OrderShippingCountryRegionChangingHandler>(); composition.WithNotificationEvent <OrderShippingMethodChangingNotification>() .RegisterHandler <OrderShippingMethodChangingHandler>(); // Register component composition.Components() .Append <DemoStoreComponent>(); }
public void Compose(Composition composition) { composition .Components() .Append <ContentmentComponent>() ; }
public void Compose(Composition composition) { // Register event handlers composition.WithNotificationEvent <OrderProductAddingNotification>() .RegisterHandler <OrderProductAddingHandler>(); composition.WithNotificationEvent <OrderLineChangingNotification>() .RegisterHandler <OrderLineChangingHandler>(); composition.WithNotificationEvent <OrderLineRemovingNotification>() .RegisterHandler <OrderLineRemovingHandler>(); composition.WithNotificationEvent <OrderPaymentCountryRegionChangingNotification>() .RegisterHandler <OrderPaymentCountryRegionChangingHandler>(); composition.WithNotificationEvent <OrderShippingCountryRegionChangingNotification>() .RegisterHandler <OrderShippingCountryRegionChangingHandler>(); composition.WithNotificationEvent <OrderShippingMethodChangingNotification>() .RegisterHandler <OrderShippingMethodChangingHandler>(); // Register component composition.Components() .Append <VendrCheckoutComponent>(); }
public void Compose(Composition composition) { composition .ContentmentListItems() .Add(() => composition.TypeLoader.GetTypes <IContentmentListItem>()) ; composition.RegisterUnique <ConfigurationEditorUtility>(); if (composition.RuntimeState.Level > RuntimeLevel.Install) { composition .Components() .Append <ContentmentComponent>() ; } if (composition.RuntimeState.Level == RuntimeLevel.Run) { if (ContentmentTelemetryComponent.Disabled == false) { composition.EnableContentmentTelemetry(); } } }
public void Compose(Composition composition) { composition.RegisterUnique <ArticulateRoutes>(); composition.RegisterUnique <ContentUrls>(); composition.RegisterUnique <ArticulateDataInstaller>(); composition.RegisterUnique <ArticulateTempFileSystem>(x => new ArticulateTempFileSystem("~/App_Data/Temp/Articulate")); composition.RegisterUnique <BlogMlExporter>(); composition.RegisterUnique <IRssFeedGenerator, RssFeedGenerator>(); composition.Register <DisqusXmlExporter>(Lifetime.Request); composition.Register <BlogMlImporter>(Lifetime.Request); composition.Register <IArticulateSearcher, DefaultArticulateSearcher>(Lifetime.Request); composition.Register <MetaWeblogHandler>(Lifetime.Transient); composition.RegisterUnique <MetaWeblogHandlerFactory>(factory => new MetaWeblogHandlerFactory(i => { var instance = factory.GetInstance <MetaWeblogHandler>(); instance.BlogRootId = i; return(instance); })); composition.UrlProviders().Append <VirtualNodeUrlProvider>(); composition.UrlProviders().InsertBefore <DefaultUrlProvider, DateFormattedUrlProvider>(); composition.ContentFinders().InsertBefore <ContentFinderByUrl, DateFormattedPostContentFinder>(); composition.Configs.Add <ArticulateOptions>(_ => ArticulateOptions.Default); composition.Components().Append <ArticulateComponent>(); }
/// <summary> /// Umbraco lifecycle method /// </summary> public void Compose(Composition composition) { composition.Register <AuthHandler>(); composition.Components() .Append <Startup>() ; }
public static FactFamilyProviderCollectionBuilder AddEnvironmentDashboard <TDashboardEnvironmentDetector>(this Composition composition) where TDashboardEnvironmentDetector : IEnvironmentDetector { composition.RegisterUnique <IEnvironmentDetector, TDashboardEnvironmentDetector>(); composition.Components().Append <BackofficeBrowserTitleComponent>(); return(composition.WithCollectionBuilder <FactFamilyProviderCollectionBuilder>()); }
public void Compose(Composition composition) { composition.Configs.Add <IModelsBuilderConfig>(() => new ModelsBuilderConfig()); if (IsExternalModelsBuilderInstalled() == true) { ComposeForExternalModelsBuilder(composition); return; } composition.Components().Append <ModelsBuilderComponent>(); composition.Register <UmbracoServices>(Lifetime.Singleton); composition.RegisterUnique <ModelsGenerator>(); composition.RegisterUnique <LiveModelsProvider>(); composition.RegisterUnique <OutOfDateModelsStatus>(); composition.RegisterUnique <ModelsGenerationError>(); if (composition.Configs.ModelsBuilder().ModelsMode == ModelsMode.PureLive) { ComposeForLiveModels(composition); } else if (composition.Configs.ModelsBuilder().EnableFactory) { ComposeForDefaultModelsFactory(composition); } }
public void Compose(Composition composition) { //disable some of the default core tours since they don't make sense to have when the starter kit is installed composition.TourFilters().AddFilter(BackOfficeTourFilter.FilterAlias(new Regex("umbIntroCreateDocType|umbIntroCreateContent|umbIntroRenderInTemplate|umbIntroViewHomePage|umbIntroMediaSection"))); composition.Components().Append <StarterKitComponent>(); }
public void Compose(Composition composition) { composition.Dashboards().Add <RedirectDashboard>(); composition.Components().Append <DatabaseUpgradeComponent>(); composition.ContentFinders().InsertBefore <ContentFinderByUrl, RedirectContentFinder>(); composition.Register(typeof(RedirectRepository), Lifetime.Request); }
public void Compose(Composition composition) { composition.Components().Append <SitemapRouteComponent>(); composition.RegisterUnique <ISitemapBuilder, SitemapBuilder>(); composition.Register(factory => GetConfiguration()); }
public void Compose(Composition composition) { composition.Components().Append <VirtualNodesComponent>(); composition.ContentFinders().Insert <VirtualNodesContentFinder>(); composition.UrlProviders().Insert <VirtualNodesUrlProvider>(); }
public void Compose(Composition composition) { composition.Register(factory => SettingsForTests.GetDefaultUmbracoSettings()); composition.RegisterUnique <IExamineManager, TestExamineManager>(); composition.Components().Append <TestComponent>(); Composed = true; }
public void Compose(Composition composition) { RegisterConfig(composition); composition.RegisterUnique <UmbracoExamine.IUmbracoIndexConfig, CoreIndexConfig>(); composition.Components().Append <ConfigComponent>(); }
public void Compose(Composition composition) { composition.Components() .Append <NullOrWhitespaceComponent>(); composition.WithCollectionBuilder <MapDefinitionCollectionBuilder>() .Add <NullOrWhitespaceMapDefinition>(); }
public void Compose(Composition composition) { composition.Components() .Append <HeadRestConfigComponent>(); composition.WithCollectionBuilder <MapDefinitionCollectionBuilder>() .Add <HeadRestMapDefinition>(); }