コード例 #1
0
 /// <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);
     }
 }
コード例 #2
0
ファイル: Bot.cs プロジェクト: mbsky/bugx
 /// <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));
 }
コード例 #3
0
ファイル: ErrorModule.cs プロジェクト: mbsky/bugx
 /// <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);
     }
 }