Class EventTargetExtensions

Namespace
Cratis.Chronicle.Sinks
Assembly
Cratis.Chronicle.dll

Extension methods for working with event types as the target of projections and reducers.

public static class EventTargetExtensions
Inheritance
EventTargetExtensions
Inherited Members

Methods

GetPublishingSequence(Type)

Gets the sequence a target event type is published to; the outbox unless PublishToAttribute says otherwise.

public static EventSequenceId GetPublishingSequence(this Type type)

Parameters

type Type

The event type.

Returns

EventSequenceId

The destination sequence.

IsEventTypeTarget(Type)

Gets whether a projection or reducer target type is an event type rather than a read model.

public static bool IsEventTypeTarget(this Type type)

Parameters

type Type

The target type.

Returns

bool

True when the type is an event type.

IsPublicEventType(Type, EventStoreName)

Gets whether an event type is public for the event store the client is connected to.

public static bool IsPublicEventType(this Type type, EventStoreName eventStore)

Parameters

type Type

The event type.

eventStore EventStoreName

The event store the client is connected to.

Returns

bool

True when declared with PublicAttribute or owned by the event store.

ValidateAsEventTarget(Type, EventStoreName)

Validates an event type that is the target of a projection or reducer.

public static void ValidateAsEventTarget(this Type type, EventStoreName eventStore)

Parameters

type Type

The event type.

eventStore EventStoreName

The event store the client is connected to.

Exceptions

EventLogIsNotAPublicationTarget

Thrown when the destination is the event log.

PrivateEventTypeCannotBePublishedToOutbox

Thrown when the outbox is the destination and the event type is not public.