Class CommandResult
Result of executing a command. Immutable record to prevent accidental modification of results.
public record CommandResult : IEquatable<CommandResult>
- Inheritance
-
CommandResult
- Implements
- Inherited Members
Constructors
CommandResult(int, bool, string?, string?)
Result of executing a command. Immutable record to prevent accidental modification of results.
public CommandResult(int ExitCode, bool Success, string? Error = null, string? Output = null)
Parameters
Properties
Error
public string? Error { get; init; }
Property Value
ExitCode
public int ExitCode { get; init; }
Property Value
Output
public string? Output { get; init; }
Property Value
Success
public bool Success { get; init; }
Property Value
Methods
Failed(int, string?, string?)
public static CommandResult Failed(int exitCode, string? error = null, string? output = null)
Parameters
Returns
Ok(string?)
public static CommandResult Ok(string? output = null)
Parameters
outputstring