Class EventStoreSubscriptionBuilder
- Assembly
- Cratis.Chronicle.dll
Represents an implementation of IEventStoreSubscriptionBuilder.
public class EventStoreSubscriptionBuilder : IEventStoreSubscriptionBuilder
- Inheritance
-
EventStoreSubscriptionBuilder
- Implements
- Inherited Members
- Extension Methods
Constructors
EventStoreSubscriptionBuilder(IEventTypes, EventStoreSubscriptionId, string)
Represents an implementation of IEventStoreSubscriptionBuilder.
public EventStoreSubscriptionBuilder(IEventTypes eventTypes, EventStoreSubscriptionId subscriptionId, string sourceEventStore)
Parameters
eventTypesIEventTypesThe IEventTypes for discovering event type identifiers.
subscriptionIdEventStoreSubscriptionIdThe unique EventStoreSubscriptionId for this subscription.
sourceEventStorestringThe name of the source event store to subscribe to.
Methods
Build()
Build the subscription definition.
public EventStoreSubscriptionDefinition Build()
Returns
WithEventType(EventTypeId)
Specify an event type by its identifier to subscribe to.
public IEventStoreSubscriptionBuilder WithEventType(EventTypeId eventTypeId)
Parameters
eventTypeIdEventTypeIdThe EventTypeId of the event type to include.
Returns
- IEventStoreSubscriptionBuilder
The builder for continuation.
WithEventType(EventTypeId, EventTypeGeneration)
Specifies an exact event generation by its identifier.
public IEventStoreSubscriptionBuilder WithEventType(EventTypeId eventTypeId, EventTypeGeneration generation)
Parameters
eventTypeIdEventTypeIdThe event type identifier.
generationEventTypeGenerationThe declared event generation.
Returns
- IEventStoreSubscriptionBuilder
The builder for continuation.
Exceptions
- EventStoreSubscriptionGenerationDeliveryNotSupported
The builder does not support exact generation declarations.
WithEventType<TEvent>()
Specify the event types to subscribe to. If not specified, all events are subscribed.
public IEventStoreSubscriptionBuilder WithEventType<TEvent>()
Returns
- IEventStoreSubscriptionBuilder
The builder for continuation.
Type Parameters
TEventThe event type to include.
WithGenerationDelivery(EventGenerationDelivery)
Sets the generation delivery policy. Compatibility is the default.
public IEventStoreSubscriptionBuilder WithGenerationDelivery(EventGenerationDelivery generationDelivery)
Parameters
generationDeliveryEventGenerationDeliveryThe generation delivery policy.
Returns
- IEventStoreSubscriptionBuilder
The builder for continuation.
Exceptions
- EventStoreSubscriptionGenerationDeliveryNotSupported
The builder does not support pinned delivery.