Interface IEventTypes
Defines a system to work with event types.
public interface IEventTypes
Properties
All
Get all EventType discovered event types.
IImmutableList<EventType> All { get; }
Property Value
AllClrTypes
Get all event types as Cratis.Chronicle.Contracts.Events.EventTypeRegistration.
IImmutableList<Type> AllClrTypes { get; }
Property Value
Methods
Discover()
Discover all event types from the entry assembly and dependencies.
Task Discover()
Returns
- Task
Awaitable task.
GetClrTypeFor(EventTypeId)
Get a Clr Type for a specific EventTypeId.
Type GetClrTypeFor(EventTypeId eventTypeId)
Parameters
eventTypeIdEventTypeIdEventTypeId to get for.
Returns
GetClrTypeFor(EventTypeId, EventTypeGeneration)
Get a Clr Type for a specific EventTypeId and EventTypeGeneration.
Type GetClrTypeFor(EventTypeId eventTypeId, EventTypeGeneration generation)
Parameters
eventTypeIdEventTypeIdEventTypeId to get for.
generationEventTypeGenerationEventTypeGeneration to get for.
Returns
GetEventTypeFor(Type)
EventType GetEventTypeFor(Type clrType)
Parameters
Returns
GetSchemaFor(EventTypeId)
Get the Cratis.Chronicle.Schemas.JsonSchema for an EventTypeId.
JsonSchema GetSchemaFor(EventTypeId eventTypeId)
Parameters
eventTypeIdEventTypeIdEventTypeId to get for.
Returns
- JsonSchema
Cratis.Chronicle.Schemas.JsonSchema for the event type.
HasFor(EventTypeId)
Check if there is a registered Clr Type for a specific EventTypeId.
bool HasFor(EventTypeId eventTypeId)
Parameters
eventTypeIdEventTypeIdEventTypeId to check for.
Returns
- bool
True if there is, false if not.
HasFor(Type)
Check if there is a registered EventTypeId for a specific Clr Type.
bool HasFor(Type clrType)
Parameters
Returns
- bool
True if there is, false if not.
Register()
Register all event types with the Chronicle.
Task Register()
Returns
- Task
Awaitable task.