Skip to content

Commit

Permalink
Merge branch 'dev' of http://git.newlifex.com/NewLife/X into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Nov 14, 2024
2 parents 1399b13 + c45a77c commit e7e2317
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions NewLife.Core/Extension/ProcessHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ public static Boolean GetHasExited(this Process process)
/// <param name="onExit">进程退出时执行</param>
/// <param name="working">工作目录</param>
/// <returns>进程退出代码</returns>
public static Int32 Run(this String cmd, String? arguments = null, Int32 msWait = 0, Action<String?>? output = null, Action<Process>? onExit = null, String? working = null) => Run(cmd, arguments, msWait, output, Encoding.UTF8, onExit, working);
public static Int32 Run(this String cmd, String? arguments = null, Int32 msWait = 0, Action<String?>? output = null, Action<Process>? onExit = null, String? working = null) => RunNew(cmd, arguments, msWait, output, Encoding.UTF8, onExit, working);

/// <summary>以隐藏窗口执行命令行</summary>
/// <param name="cmd">文件名</param>
Expand All @@ -322,7 +322,7 @@ public static Boolean GetHasExited(this Process process)
/// <param name="onExit">进程退出时执行</param>
/// <param name="working">工作目录</param>
/// <returns>进程退出代码</returns>
public static Int32 Run(this String cmd, String? arguments = null, Int32 msWait = 0, Action<String?>? output = null, Encoding? encoding = null, Action<Process>? onExit = null, String? working = null)
public static Int32 RunNew(this String cmd, String? arguments = null, Int32 msWait = 0, Action<String?>? output = null, Encoding? encoding = null, Action<Process>? onExit = null, String? working = null)
{
if (XTrace.Log.Level <= LogLevel.Debug) XTrace.WriteLine("Run {0} {1} {2}", cmd, arguments, msWait);

Expand Down

0 comments on commit e7e2317

Please sign in to comment.