RunicCallReply<TModel> class

Namespace Runic.Application.Testing in Runic.Application.Testing 0.23.0

public sealed class RunicCallReply<TModel> where TModel : class

The reply of a set or command request.

Properties

ErrorKind

public string? ErrorKind { get; }

The BridgeError kind of a failed call, such as rejected or failed, released for a released View or closed window, or domain-failed for a command's declared failure (RunicCallReply.Failure). Error kinds are an open set: a minor release may add kinds, so compare with the ones a test expects. A rejected reply's reason is RunicCallReply.ErrorReason.

ErrorMessage

public string? ErrorMessage { get; }

The message of a failed call.

ErrorReason

public string? ErrorReason { get; }

The reason that refines RunicCallReply.ErrorKind, or null: unavailable (the command's CanExecute is false), invalid-input (the value or argument does not decode or is refused) or unresolved-key (a RunicCommandKeyAttribute command's key names no object) for rejected. Reasons are an open set: a minor release may add some.

Failure

public JsonElement? Failure { get; }

The encoded declared failure of a domain-failed reply, such as {"$case":"titleRequired"}.

Json

public string Json { get; }

The reply as .NET serialized it.

RegionOutcome

public NavigationOutcome? RegionOutcome { get; }

The outcome of a SelectRegionAsync or CloseRegionAsync call that ran, such as Rejected(Guard) when a departure guard kept the region; otherwise null.

Released

public bool Released { get; }

Whether the request released its own route while it ran.

Revision

public long? Revision { get; }

The revision of the first state of the route that includes the request's effects, when the request ran.

Route

public string Route { get; }

The route, request kind and member that were called.

State

public RunicViewState<TModel>? State { get; }

The route's state after the call, read when the reply carries a revision.

Succeeded

public bool Succeeded { get; }

Whether the call succeeded.

Superseded

public bool Superseded { get; }

Whether a set was not applied because a later edit of the member was admitted before it.

Methods

ThrowIfFailed

public RunicCallReply<TModel> ThrowIfFailed()

Returns this reply, or throws when the call failed.

Exceptions

InvalidOperationException

The call failed; the message names the route, error kind and message.

ToString

public override string ToString()

Inherits documentation from Object.ToString.