Interface IEventSources

Namespace
Cratis.Chronicle.EventSources
Assembly
Cratis.Chronicle.dll

Defines the system for working with the event source definitions of an event store.

public interface IEventSources
Extension Methods

Properties

All

Gets all discovered event source definitions.

IReadOnlyList<EventSourceDefinition> All { get; }

Property Value

IReadOnlyList<EventSourceDefinition>

Methods

Discover()

Discover the event source definitions from the client artifacts.

Task Discover()

Returns

Task

Awaitable task.

Exceptions

DuplicateEventSourceName

Thrown when two definitions share a name.

DuplicateEventStreamName

Thrown when a definition declares the same stream twice.

GetFor(string)

Get the definition with a name.

EventSourceDefinition GetFor(string name)

Parameters

name string

The name of the event source.

Returns

EventSourceDefinition

The EventSourceDefinition.

Exceptions

UnknownEventSource

Thrown when there is no event source with the name.

GetFor(Type)

Get the definition carried by a type.

EventSourceDefinition GetFor(Type type)

Parameters

type Type

The type of the IEventSource.

Returns

EventSourceDefinition

The EventSourceDefinition.

Exceptions

UnknownEventSource

Thrown when the type is not a discovered event source.

Register()

Register the discovered definitions with the Kernel.

Task Register()

Returns

Task

Awaitable task.