예제 #1
0
        private void StopInner(StartStopContext context)
        {
            if (!this.IsRunning)
            {
                return;
            }

            var isRunning = false;

            try
            {
                this.OnStop(context, ref isRunning);
            }
            finally
            {
                this.IsRunning = isRunning;
            }
        }
예제 #2
0
        private void StartInner(StartStopContext context)
        {
            if (this.IsRunning)
            {
                return;
            }

            bool isRunning = true;

            try
            {
                this.OnStart(context, ref isRunning);
            }
            finally
            {
                this.IsRunning = isRunning;
            }
        }
예제 #3
0
 /// <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);