Esempio n. 1
0
    public static GoodProcessThread RunProcessThread(string path, string arguments, Action <GoodProcessThread> completeCallback, System.Collections.Specialized.StringDictionary env)
    {
        GoodProcessThread worker = new GoodProcessThread(path, arguments, completeCallback, env);

        worker.Thread = new Thread(worker.Work)
        {
            IsBackground = true,
            Priority     = ThreadPriority
        };
        worker.Thread.Start();

        return(worker);
    }
Esempio n. 2
0
 public static Action <GoodProcessThread> TryInvoke(this Action <GoodProcessThread> action, GoodProcessThread worker)
 {
     if (action != null)
     {
         action.Invoke(worker);
     }
     return(action);
 }
Esempio n. 3
0
    public static GoodProcessThread RunProcessThread(string path, string arguments, Action <GoodProcessThread> completeCallback)
    {
        GoodProcessThread worker = new GoodProcessThread(path, arguments, completeCallback);

        return(worker.RunThread());
    }