Class CommandResult
- Namespace
- MiniTui
- Assembly
- MiniTui.dll
Result of executing a command.
public record CommandResult : IEquatable<CommandResult>
- Inheritance
-
CommandResult
- Implements
- Inherited Members
Constructors
CommandResult(bool, string?, bool)
Result of executing a command.
public CommandResult(bool Success, string? Message = null, bool ShouldQuit = false)
Parameters
Properties
Message
public string? Message { get; init; }
Property Value
ShouldQuit
public bool ShouldQuit { get; init; }
Property Value
Success
public bool Success { get; init; }
Property Value
Methods
Error(string)
Failed result with an error message.
public static CommandResult Error(string message)
Parameters
messagestring
Returns
Ok()
Successful result with no message.
public static CommandResult Ok()
Returns
Ok(string)
Successful result with a message.
public static CommandResult Ok(string message)
Parameters
messagestring
Returns
Quit(string?)
Result that signals the app should quit.
public static CommandResult Quit(string? message = null)
Parameters
messagestring