Class MetadataBuilderEventSourcingExtensions
Extension methods for setting event sourcing properties on IMessageMetadataBuilder.
public static class MetadataBuilderEventSourcingExtensions
- Inheritance
-
MetadataBuilderEventSourcingExtensions
- Inherited Members
Methods
WithEventSourcing(IMessageMetadataBuilder, string?, string?, long?, string?, long?)
Sets event sourcing metadata in a single call.
public static IMessageMetadataBuilder WithEventSourcing(this IMessageMetadataBuilder builder, string? aggregateId, string? aggregateType = null, long? aggregateVersion = null, string? streamName = null, long? streamPosition = null)
Parameters
builderIMessageMetadataBuilderThe builder instance.
aggregateIdstringThe aggregate identifier.
aggregateTypestringThe aggregate type name.
aggregateVersionlong?The aggregate version.
streamNamestringThe event stream name.
streamPositionlong?The position within the event stream.
Returns
- IMessageMetadataBuilder
The builder instance for method chaining.
WithEventType(IMessageMetadataBuilder, string?)
Sets the event type name.
public static IMessageMetadataBuilder WithEventType(this IMessageMetadataBuilder builder, string? eventType)
Parameters
builderIMessageMetadataBuilderThe builder instance.
eventTypestringThe type name of the event.
Returns
- IMessageMetadataBuilder
The builder instance for method chaining.
WithEventVersion(IMessageMetadataBuilder, int)
Sets the event version for event schema evolution.
public static IMessageMetadataBuilder WithEventVersion(this IMessageMetadataBuilder builder, int eventVersion)
Parameters
builderIMessageMetadataBuilderThe builder instance.
eventVersionintThe version of the event schema.
Returns
- IMessageMetadataBuilder
The builder instance for method chaining.
WithGlobalPosition(IMessageMetadataBuilder, long)
Sets the global position in the event store.
public static IMessageMetadataBuilder WithGlobalPosition(this IMessageMetadataBuilder builder, long globalPosition)
Parameters
builderIMessageMetadataBuilderThe builder instance.
globalPositionlongThe global position across all streams.
Returns
- IMessageMetadataBuilder
The builder instance for method chaining.