Table of Contents

Class CommandRunnerResult

Namespace
OneImlx.Terminal.Commands.Runners
Assembly
OneImlx.Terminal.dll

Represents the result of a command runner.

public class CommandRunnerResult
Inheritance
CommandRunnerResult
Inherited Members

Constructors

CommandRunnerResult()

Initializes a new instance of the CommandRunnerResult class.

public CommandRunnerResult()

CommandRunnerResult(object)

Initializes a new instance of the CommandRunnerResult class with a specified value.

public CommandRunnerResult(object value)

Parameters

value object

The result value of the command.

Properties

HasValue

Indicates whether the result has a value.

public bool HasValue { get; }

Property Value

bool

Value

Gets the value of the result.

public object Value { get; }

Property Value

object

Methods

As<TValue>()

Gets the value as the specified type.

public TValue As<TValue>()

Returns

TValue

The value cast to the specified type.

Type Parameters

TValue

The type to cast the value to.

Exceptions

InvalidCastException

Thrown if the value cannot be cast to the specified type.

Empty()

Creates an empty CommandRunnerResult with no value.

public static CommandRunnerResult Empty()

Returns

CommandRunnerResult

A new instance of CommandRunnerResult.

EmptyAsync()

Creates an empty CommandRunnerResult with no value.

public static Task<CommandRunnerResult> EmptyAsync()

Returns

Task<CommandRunnerResult>

A task that creates a new instance of CommandRunnerResult.