Skip to main content
Table of Contents

Class OutboxEntryMapper

Namespace
Stratara.Shared.Outbox.Mapping
Assembly
Stratara.Shared.dll

Conversion helpers that hydrate the JSON payload of an OutboxEntry back into a typed message instance (e.g. CommandEnvelope, EventBundle).

public static class OutboxEntryMapper
Inheritance
OutboxEntryMapper
Inherited Members

Methods

MapTo<T>(OutboxEntry)

Deserializes DataJson into the requested type T.

public static T MapTo<T>(this OutboxEntry outboxEntry)

Parameters

outboxEntry OutboxEntry

The outbox row carrying the JSON payload.

Returns

T

The deserialized payload.

Type Parameters

T

Target type to deserialize into.

Exceptions

JsonException

Thrown when the JSON payload cannot be deserialized to T.

MapTo<T>(IEnumerable<OutboxEntry>)

Deserializes a batch of OutboxEntry rows into typed T instances. The result preserves the input order.

public static IReadOnlyList<T> MapTo<T>(this IEnumerable<OutboxEntry> outboxEntries)

Parameters

outboxEntries IEnumerable<OutboxEntry>

The outbox rows to map.

Returns

IReadOnlyList<T>

Materialized read-only list of T values.

Type Parameters

T

Target type to deserialize each entry into.

Exceptions

JsonException

Thrown when any entry's JSON payload cannot be deserialized.