Пример #1
0
 /// <summary>
 /// Start the process synchronously, catch the exceptions
 /// </summary>
 /// <param name="arguments">Each argument is expected to be quoted if necessary and double quotes escaped with a second double quote (use quoter).</param>
 /// <param name="silent"></param>
 /// <returns></returns>
 public virtual bool TryExecute(ProcessArgs arguments = null, bool silent = true) {
     try {
         return Execute(arguments, silent) && ErrorOutputArray.Count == 0;
     } catch (Exception e) {
         ErrorOutputArray.Add(e.ToString());
         return false;
     }
 }
Пример #2
0
 protected virtual void OnProcessOnErrorDataReceived(object sender, DataReceivedEventArgs args) {
     if (!string.IsNullOrEmpty(args.Data)) {
         ErrorOutputArray.Add(args.Data);
     }
 }