Esempio n. 1
0
        public static Process Start(
            [Implicit] StepBro.Core.Execution.ICallContext context,
            string filename,
            string arguments      = "",
            TimeSpan startTimeout = new TimeSpan(),
            TimeSpan exitTimeout  = new TimeSpan()
            // bool moveWindow = false
            )
        {
            var process = ObjectMonitorManager.Register(
                new Process((ILogger)context, System.Diagnostics.Process.Start(filename, arguments)));

            if (startTimeout > TimeSpan.Zero)
            {
                if (!process.AwaitStart(context.Logger, startTimeout))
                {
                    //context.RegisterResult()
                    return(process);
                }
            }

            return(process);
        }
Esempio n. 2
0
 public static Process Start(ILogger logger = null, string filename = "", string arguments = "")
 {
     return(ObjectMonitorManager.Register(
                new Process(logger, System.Diagnostics.Process.Start(filename, arguments))));
 }