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
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
namestringThe name of the event source.
Returns
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
typeTypeThe type of the IEventSource.
Returns
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.