Table of Contents

Class CommandResult

Namespace
Opossum.Core
Assembly
Opossum.dll

Represents the result of a command operation without a return value

public record CommandResult : IEquatable<CommandResult>
Inheritance
CommandResult
Implements
Inherited Members

Constructors

CommandResult(bool, string?)

Represents the result of a command operation without a return value

public CommandResult(bool Success, string? ErrorMessage = null)

Parameters

Success bool
ErrorMessage string

Properties

ErrorMessage

public string? ErrorMessage { get; init; }

Property Value

string

Success

public bool Success { get; init; }

Property Value

bool

Methods

Fail(string)

Creates a failed command result with an error message

public static CommandResult Fail(string errorMessage)

Parameters

errorMessage string

Returns

CommandResult

Ok()

Creates a successful command result

public static CommandResult Ok()

Returns

CommandResult