Class InvokeResult

Namespace
Kuestenlogik.Bowire
Assembly
Kuestenlogik.Bowire.dll

Result of a protocol invocation (unary or client-streaming).

public sealed record InvokeResult : IEquatable<InvokeResult>
Inheritance
InvokeResult
Implements
Inherited Members

Constructors

InvokeResult(string?, long, string, Dictionary<string, string>, byte[]?)

Result of a protocol invocation (unary or client-streaming).

public InvokeResult(string? Response, long DurationMs, string Status, Dictionary<string, string> Metadata, byte[]? ResponseBinary = null)

Parameters

Response string

Response as JSON string for display + recording.

DurationMs long

Wall-clock duration the invocation took, server-side.

Status string

Status label (HTTP code name, gRPC status name, or "OK").

Metadata Dictionary<string, string>

Response headers + trailers (for gRPC, trailer keys are prefixed with _trailer:).

ResponseBinary byte[]

Optional raw wire-bytes of the response. Populated by protocols that have a binary serialization distinct from their JSON representation (gRPC protobuf today). Consumed by the mock-server replay path so the recorded response can be re-emitted byte-for-byte without runtime re-encoding. null for protocols where the JSON in Response is the authoritative wire form (REST, GraphQL, SignalR).

Properties

DurationMs

Wall-clock duration the invocation took, server-side.

public long DurationMs { get; init; }

Property Value

long

Metadata

Response headers + trailers (for gRPC, trailer keys are prefixed with _trailer:).

public Dictionary<string, string> Metadata { get; init; }

Property Value

Dictionary<string, string>

Response

Response as JSON string for display + recording.

public string? Response { get; init; }

Property Value

string

ResponseBinary

Optional raw wire-bytes of the response. Populated by protocols that have a binary serialization distinct from their JSON representation (gRPC protobuf today). Consumed by the mock-server replay path so the recorded response can be re-emitted byte-for-byte without runtime re-encoding. null for protocols where the JSON in Response is the authoritative wire form (REST, GraphQL, SignalR).

public byte[]? ResponseBinary { get; init; }

Property Value

byte[]

Status

Status label (HTTP code name, gRPC status name, or "OK").

public string Status { get; init; }

Property Value

string

Methods

Deconstruct(out string?, out long, out string, out Dictionary<string, string>, out byte[]?)

public void Deconstruct(out string? Response, out long DurationMs, out string Status, out Dictionary<string, string> Metadata, out byte[]? ResponseBinary)

Parameters

Response string
DurationMs long
Status string
Metadata Dictionary<string, string>
ResponseBinary byte[]

Equals(InvokeResult?)

public bool Equals(InvokeResult? other)

Parameters

other InvokeResult

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(InvokeResult?, InvokeResult?)

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

Parameters

left InvokeResult
right InvokeResult

Returns

bool

operator !=(InvokeResult?, InvokeResult?)

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

Parameters

left InvokeResult
right InvokeResult

Returns

bool