public static void UseCompositeC1ContribScheduledTasks(this IAppBuilder app, Action <ScheduledTasksConfiguration> configurationCallback) { var options = new ScheduledTasksConfiguration(); configurationCallback?.Invoke(options); var configuration = GlobalConfiguration.Configuration; configuration.UseActivator(new C1CMSContainerJobActivator()); configuration.UseLogProvider(new C1LogProvider()); configuration.UseStorage(options.JobStorage); var backgroundProcesses = CompositionContainerFacade.GetExportedValues <IBackgroundProcess>().ToArray(); if (options.ServerOptions != null) { app.UseHangfireServer(options.ServerOptions, backgroundProcesses); } else { app.UseHangfireServer(backgroundProcesses); } app.UseHangfireDashboard("/hangfire", new DashboardOptions { AppPath = null, Authorization = new[] { new CompositeC1AuthorizationFilter() } }); ScheduledTasksSection.EnsureJobsFromConfig(); UrlToEntityTokenFacade.Register(new UrlToEntityTokenMapper()); }
private static void InitializeServices() { UrlToEntityTokenFacade.Register(new DataUrlToEntityTokenMapper()); UrlToEntityTokenFacade.Register(new ServerLogUrlToEntityTokenMapper()); RoutedData.ConfigureServices(ServiceLocator.ServiceCollection); InternalUrls.Register(new MediaInternalUrlConverter()); InternalUrls.Register(new PageInternalUrlConverter()); }
public static void OnInitialized() { DataEventSystemFacade.SubscribeToDataBeforeUpdate <Entries>(BlogFacade.SetTitleUrl, true); DataEventSystemFacade.SubscribeToDataBeforeAdd <Entries>(BlogFacade.SetTitleUrl, true); DataEventSystemFacade.SubscribeToDataAfterAdd <Entries>(BlogFacade.ClearRssFeedCache, true); DataEventSystemFacade.SubscribeToDataAfterUpdate <Entries>(BlogFacade.ClearRssFeedCache, true); DataEventSystemFacade.SubscribeToDataDeleted <Entries>(BlogFacade.ClearRssFeedCache, true); DataUrls.RegisterGlobalDataUrlMapper <Entries>(new BlogEntryDataUrlMapper()); UrlToEntityTokenFacade.Register(new BlogUrlToEntityTokenMapper()); }
private static void InitializeServices() { UrlToEntityTokenFacade.Register(new DataUrlToEntityTokenMapper()); UrlToEntityTokenFacade.Register(new ServerLogUrlToEntityTokenMapper()); RoutedData.ConfigureServices(ServiceLocator.ServiceCollection); using (new LogExecutionTime(_verboseLogEntryTitle, "Initializing dynamic data action tokens")) { DataActionTokenResolverRegistery.Register(ServiceLocator.ServiceCollection); } InternalUrls.Register(new MediaInternalUrlConverter()); InternalUrls.Register(new PageInternalUrlConverter()); }
public static void OnInitialized(KeywordChangeNotifier keywordChangeNotifier) { DynamicTypeManager.EnsureCreateStore(typeof(RedirectKeyword)); DataEvents <RedirectKeyword> .OnAfterAdd += keywordChangeNotifier.KeywordChange; DataEvents <RedirectKeyword> .OnAfterUpdate += keywordChangeNotifier.KeywordChange; DataEvents <RedirectKeyword> .OnDeleted += keywordChangeNotifier.KeywordChange; DataEvents <IPage> .OnAfterAdd += keywordChangeNotifier.KeywordChange; DataEvents <IPage> .OnAfterUpdate += keywordChangeNotifier.KeywordChange; DataEvents <IPage> .OnDeleted += keywordChangeNotifier.KeywordChange; var functions = MvcFunctionRegistry.NewFunctionCollection(); RegisterFunctions(functions); RegisterFunctionRoutes(functions); UrlToEntityTokenFacade.Register(new KeywordsUrlToEntityTokenMapper()); }
private static void InitializeServices() { UrlToEntityTokenFacade.Register(new DataUrlToEntityTokenMapper()); UrlToEntityTokenFacade.Register(new ServerLogUrlToEntityTokenMapper()); var services = ServiceLocator.ServiceCollection; services.AddLogging(); services.AddRoutedData(); services.AddDataActionTokenResolver(); services.AddDefaultSearchDocumentSourceProviders(); InternalUrls.Register(new MediaInternalUrlConverter()); InternalUrls.Register(new PageInternalUrlConverter()); VersionedDataHelper.Initialize(); }
private static void InitializeServices() { UrlToEntityTokenFacade.Register(new DataUrlToEntityTokenMapper()); UrlToEntityTokenFacade.Register(new MediaUrlToEntityTokenMapper()); UrlToEntityTokenFacade.Register(new ServerLogUrlToEntityTokenMapper()); UrlToEntityTokenFacade.Register(new WebsiteFileUrlToEntityTokenMapper()); var services = ServiceLocator.ServiceCollection; services.AddLogging(); services.AddRoutedData(); services.AddDataActionTokenResolver(); services.AddDefaultSearchDocumentSourceProviders(); InternalUrls.Register(new MediaInternalUrlConverter()); InternalUrls.Register(new PageInternalUrlConverter()); services.AddSingleton <IMailer>(new SmtpMailer()); services.AddTransient <ISiteMapPlugin, CmsPagesSiteMapPlugin>(); VersionedDataHelper.Initialize(); }