SPT-AKI-Installer/SPTInstaller/Models/ReadProcessResult.cs
2024-05-01 10:31:55 -04:00

19 lines
610 B
C#

namespace SPTInstaller.Models;
public class ReadProcessResult : Result
{
public string StdOut { get; }
public string StdErr { get; }
protected ReadProcessResult(string message, bool succeeded, string stdOut = "", string stdErr = "") : base(message,
succeeded)
{
StdOut = stdOut;
StdErr = stdErr;
}
public static ReadProcessResult FromSuccess(string stdOut, string stdErr) =>
new ReadProcessResult("ok", true, stdOut, stdErr);
public new static ReadProcessResult FromError(string message) => new ReadProcessResult(message, false);
}