Exemplo n.º 1
0
        protected virtual void WaitForTerminateWorker(IExecutionContext context)
        {
            //get amount to wait from settings
            int waitMiliseconds = (int)TimeSpan.FromSeconds(this.SettingsAs<SteamLicenseManagerSettings>().ChildWaitTimeout).TotalMilliseconds;

            //start waiting
            this.TerminateHandle.Wait(waitMiliseconds);

            //check if waiting was reset
            if (this.TerminateHandle.WaitingTermination)
            {
                //kill all processes in context
                context.Kill();

                //report terminate triggered process
                this.OnReportTerminate(context);
            }
        }