Table of Contents

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

Success bool
Message string
ShouldQuit bool

Properties

Message

public string? Message { get; init; }

Property Value

string

ShouldQuit

public bool ShouldQuit { get; init; }

Property Value

bool

Success

public bool Success { get; init; }

Property Value

bool

Methods

Error(string)

Failed result with an error message.

public static CommandResult Error(string message)

Parameters

message string

Returns

CommandResult

Ok()

Successful result with no message.

public static CommandResult Ok()

Returns

CommandResult

Ok(string)

Successful result with a message.

public static CommandResult Ok(string message)

Parameters

message string

Returns

CommandResult

Quit(string?)

Result that signals the app should quit.

public static CommandResult Quit(string? message = null)

Parameters

message string

Returns

CommandResult