Class EventTypeExtensions
public static class EventTypeExtensions
- Inheritance
-
EventTypeExtensions
- Inherited Members
Methods
GetEventStoreName(Type)
Get the event store name for an event type.
public static string? GetEventStoreName(this Type type)
Parameters
typeTypeType to get for.
Returns
Remarks
First checks for a type-level EventStoreAttribute. If not found, falls back to an assembly-level EventStoreAttribute on the type's declaring assembly.
GetEventType(Type)
Get the EventType for a CLR type.
public static EventType GetEventType(this Type type)
Parameters
Returns
Exceptions
- TypeIsNotAnEventType
Thrown if the type is not an event type.
GetEventTypes(Type, IEnumerable<Type>)
Get the event types for a type.
public static IEnumerable<Type> GetEventTypes(this Type type, IEnumerable<Type> eventTypes)
Parameters
typeTypeThe CLR type to get for.
eventTypesIEnumerable<Type>Known event types in the process.
Returns
- IEnumerable<Type>
Collection of actual event types.
IsEventType(Type, IEnumerable<Type>)
Check if a type is an event type.
public static bool IsEventType(this Type type, IEnumerable<Type> eventTypes)
Parameters
typeTypeType to check.
eventTypesIEnumerable<Type>Known event types in the process.
Returns
- bool
True if it is an event type, false if not.
ValidateEventType(Type)
Validate if a type is an event type.
public static void ValidateEventType(this Type type)
Parameters
typeTypeType to validate.
Exceptions
- TypeIsNotAnEventType
Thrown if the type is not an event type.