private void InstalledPackage_BeforeDelete(InstalledPackage sender, System.EventArgs e) { if (sender.Data.Name == "DTP App Pool Refresh") { InstallHelper installHelper = new InstallHelper(); installHelper.RemoveSectionDashboard(); installHelper.RemoveAppSetting(); } }
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) { if (WebConfigurationManager.AppSettings["AppPoolRefresh:TouchedOn"] == null) { InstallHelper installHelper = new InstallHelper(); installHelper.AddSectionDashboard(); installHelper.AddAppSetting(); } InstalledPackage.BeforeDelete += InstalledPackage_BeforeDelete; }