protected void Application_End(object sender, EventArgs e) { BackgroundServicesExecutor backgroundServicesExecutor = (BackgroundServicesExecutor)Application["backgroundServicesExecutor"]; if (backgroundServicesExecutor != null) { backgroundServicesExecutor.Stop(); } }
protected virtual void OnEnd() { BackgroundServicesExecutor backgroundServicesExecutor = (BackgroundServicesExecutor)Application["backgroundServicesExecutor"]; if (backgroundServicesExecutor != null) { backgroundServicesExecutor.Stop(); } }
public void Cleanup(IDictionary <string, object> state) { BackgroundServicesExecutor backgroundServicesExecutor = (BackgroundServicesExecutor)(state.ContainsKey("backgroundServicesExecutor") ? state["backgroundServicesExecutor"] : null); if (backgroundServicesExecutor != null) { backgroundServicesExecutor.Stop(); } }