protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) { using (ApplicationContext.Current.ProfilingLogger.TraceDuration <Startup>("Begin ApplicationStarted", "End ApplicationStarted")) { base.ApplicationStarted(umbracoApplication, applicationContext); this.SetupMigration(); Mapper.AddProfile <RuleProfile>(); EditorModelEventManager.SendingContentModel += EditorModelEventManagerEventHandler.SendingContentModel; CacheRefresherBase <RuleCacheRefresher> .CacheUpdated += this.CacheUpdated; ServerVariablesParser.Parsing += this.ServerVariablesParserParsing; } if (HidePropertiesContext.Current.Configuration.EnableImport && HidePropertiesContext.Current.Configuration.ImportAtStartup) { using (ApplicationContext.Current.ProfilingLogger.TraceDuration <Startup>("Begin import rules", "End import rules")) { HidePropertiesContext.Current.ImportRules(); RuleCacheRefresher.ClearCache(); } } }
public HttpResponseMessage Import() { HidePropertiesContext.Current.ImportRules(); RuleCacheRefresher.ClearCache(); return(this.Request.CreateResponse(HttpStatusCode.OK)); }
private Rule UpdateRule(Rule rule) { rule = RuleService.Current.Save(rule); if (rule != null) { RuleCacheRefresher.ClearCache(); if (HidePropertiesContext.Current.Configuration.EnableExport && HidePropertiesContext.Current.Configuration.ExportOnSave) { HidePropertiesContext.Current.ExportRules(); } } return(rule); }