Table of Contents

Class MetadataBuilderEventSourcingExtensions

Namespace
Excalibur.Dispatch
Assembly
Excalibur.Dispatch.Abstractions.dll

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

builder IMessageMetadataBuilder

The builder instance.

aggregateId string

The aggregate identifier.

aggregateType string

The aggregate type name.

aggregateVersion long?

The aggregate version.

streamName string

The event stream name.

streamPosition long?

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

builder IMessageMetadataBuilder

The builder instance.

eventType string

The 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

builder IMessageMetadataBuilder

The builder instance.

eventVersion int

The 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

builder IMessageMetadataBuilder

The builder instance.

globalPosition long

The global position across all streams.

Returns

IMessageMetadataBuilder

The builder instance for method chaining.