Class CommandHandlerArgumentResolution

Namespace
Cratis.Arc.Commands
Assembly
Cratis.Arc.Core.dll

Represents the outcome of resolving the arguments for a command handler.

public record CommandHandlerArgumentResolution : IEquatable<CommandHandlerArgumentResolution>
Inheritance
CommandHandlerArgumentResolution
Implements
Inherited Members
Extension Methods

Constructors

CommandHandlerArgumentResolution(CommandHandlerArgumentResolution)

protected CommandHandlerArgumentResolution(CommandHandlerArgumentResolution original)

Parameters

original CommandHandlerArgumentResolution

CommandHandlerArgumentResolution(IReadOnlyList<object?>, CommandResult)

Represents the outcome of resolving the arguments for a command handler.

public CommandHandlerArgumentResolution(IReadOnlyList<object?> Arguments, CommandResult ControlResult)

Parameters

Arguments IReadOnlyList<object>

The resolved arguments to pass to the handler, in declaration order.

ControlResult CommandResult

The CommandResult produced by any short-circuiting control values returned from the command's Provide method. Successful when nothing short-circuited.

Properties

Arguments

The resolved arguments to pass to the handler, in declaration order.

public IReadOnlyList<object?> Arguments { get; init; }

Property Value

IReadOnlyList<object>

ControlResult

The CommandResult produced by any short-circuiting control values returned from the command's Provide method. Successful when nothing short-circuited.

public CommandResult ControlResult { get; init; }

Property Value

CommandResult

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

IsShortCircuited

Gets a value indicating whether argument resolution short-circuited command execution.

public bool IsShortCircuited { get; }

Property Value

bool

Methods

Deconstruct(out IReadOnlyList<object?>, out CommandResult)

public void Deconstruct(out IReadOnlyList<object?> Arguments, out CommandResult ControlResult)

Parameters

Arguments IReadOnlyList<object>
ControlResult CommandResult

Equals(CommandHandlerArgumentResolution?)

public virtual bool Equals(CommandHandlerArgumentResolution? other)

Parameters

other CommandHandlerArgumentResolution

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(CommandHandlerArgumentResolution?, CommandHandlerArgumentResolution?)

public static bool operator ==(CommandHandlerArgumentResolution? left, CommandHandlerArgumentResolution? right)

Parameters

left CommandHandlerArgumentResolution
right CommandHandlerArgumentResolution

Returns

bool

operator !=(CommandHandlerArgumentResolution?, CommandHandlerArgumentResolution?)

public static bool operator !=(CommandHandlerArgumentResolution? left, CommandHandlerArgumentResolution? right)

Parameters

left CommandHandlerArgumentResolution
right CommandHandlerArgumentResolution

Returns

bool