Class OutboxEntryMapper
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
outboxEntryOutboxEntryThe outbox row carrying the JSON payload.
Returns
- T
The deserialized payload.
Type Parameters
TTarget 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
outboxEntriesIEnumerable<OutboxEntry>The outbox rows to map.
Returns
- IReadOnlyList<T>
Materialized read-only list of
Tvalues.
Type Parameters
TTarget type to deserialize each entry into.
Exceptions
- JsonException
Thrown when any entry's JSON payload cannot be deserialized.