PowerShellHelperPsResult 构造函数

表示脚本执行结果。

Definition

命名空间: Suresking.Utility
程序集: Suresking.Utility (在 Suresking.Utility.dll 中) 版本:1.3.22+a27276bb8ffde055e69ff608e98aafba279e1e99
C#
public PsResult(
	int ExitCode,
	string Output,
	string Error
)

参数

ExitCode  Int32
进程退出码,0 通常表示成功。
Output  String
标准输出(stdout)的全部内容。
Error  String
标准错误(stderr)的全部内容。

备注

该记录为不可变类型,适合作为执行结果的载体进行传递与比较。 注意:PowerShell 中非终止性错误可能不会改变退出码,因此即使 IsSuccess 为 true, Error 也可能包含错误信息,调用方应按需同时检查两者。

参见