RunicCallReply<TModel> class

Namespace Runic.Application.Testing · Runic.Application.Testing 0.7.0-preview.5

public sealed class RunicCallReply<TModel> where TModel : class

The reply of a generated setter or command route.

Properties

ErrorKind

public string? ErrorKind { get; }

The error kind of a failed call, such as rejected or failed, or domain-failed for a command's declared failure (RunicCallReply.Failure).

ErrorMessage

public string? ErrorMessage { get; }

The message of a failed call.

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.

Ok

public bool Ok { get; }

Whether the call succeeded.

Route

public string Route { get; }

The route that was called.

State

public RunicViewState<TModel>? State { get; }

The state after the call, when the reply carries one.

Methods

EnsureOk

public RunicCallReply<TModel> EnsureOk()

Returns this reply, or throws when the call failed.

ToString

public override string ToString()

Inherits documentation from Object.ToString.