private void StopInner(StartStopContext context) { if (!this.IsRunning) { return; } var isRunning = false; try { this.OnStop(context, ref isRunning); } finally { this.IsRunning = isRunning; } }
private void StartInner(StartStopContext context) { if (this.IsRunning) { return; } bool isRunning = true; try { this.OnStart(context, ref isRunning); } finally { this.IsRunning = isRunning; } }
/// <summary> /// The logic for <see cref="AppServerModuleBase.Stop()" /> and /// the <see cref="AppServerModuleBase.Restart()" /> method. /// </summary> /// <param name="context">The invokation context.</param> /// <param name="isRunning"> /// The new value for <see cref="AppServerModuleBase.IsRunning" /> property. /// Is <see langword="false" /> by default. /// </param> protected abstract void OnStop(StartStopContext context, ref bool isRunning);