/// <summary> /// Raises the application unload event. /// </summary> /// <param name="e">The <see cref="Bugx.Web.ApplicationUnloadEventArgs"/> instance containing the event data.</param> static void OnApplicationUnload(ApplicationUnloadEventArgs e) { if (ApplicationUnload != null && ++UnloadCounter <= 2) { ApplicationUnload(null, e); } }
/// <summary> /// Handles the ApplicationUnload event of the ErrorModule control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="Bugx.Web.ApplicationUnloadEventArgs"/> instance containing the event data.</param> void ErrorModule_ApplicationUnload(object sender, ApplicationUnloadEventArgs e) { string reason = e.Reason.ToString(); Message(string.Format(CultureInfo.InvariantCulture, Texts.ApplicationIsShuttingDown, Texts.ResourceManager.GetString("Shutdown" + reason, Texts.Culture) ?? reason)); }