Ejemplo n.º 1
0
 public ControlWindowsServiceTask(string machineName, string serviceName, ControlWindowsServiceMode mode, TimeSpan timeout)
 {
     this.serviceName = serviceName;
     this.mode        = mode;
     this.timeout     = timeout;
     MachineName      = machineName;
 }
Ejemplo n.º 2
0
 public TRunner ControlWindowsService(
     string serviceName,
     ControlWindowsServiceMode mode,
     TimeSpan timeout)
 {
     ControlWindowsServiceTask.Execute(scriptExecutionEnvironment, serviceName, mode, timeout);
     return(ReturnThisTRunner());
 }
Ejemplo n.º 3
0
 public static void Execute(
     ITaskContext environment,
     string serviceName,
     ControlWindowsServiceMode mode,
     TimeSpan timeout)
 {
     Execute(environment, serviceName, mode, timeout, true);
 }
Ejemplo n.º 4
0
 public static void Execute(
     ITaskContext environment,
     string serviceName,
     ControlWindowsServiceMode mode,
     TimeSpan timeout,
     bool failIfNotExist)
 {
     Execute(environment, ".", serviceName, mode, timeout, failIfNotExist);
 }
Ejemplo n.º 5
0
        public static void Execute(
            ITaskContext environment,
            string machineName,
            string serviceName,
            ControlWindowsServiceMode mode,
            TimeSpan timeout,
            bool failIfNotExist)
        {
            ControlWindowsServiceTask task = new ControlWindowsServiceTask(machineName, serviceName, mode, timeout)
            {
                FailIfNotExist = failIfNotExist
            };

            task.Execute(environment);
        }
Ejemplo n.º 6
0
 public ControlWindowsServiceTask(string serviceName, ControlWindowsServiceMode mode, TimeSpan timeout) :
     this(".", serviceName, mode, timeout)
 {
 }