Table of Contents

Class EventTypeExtensions

Namespace
Cratis.Chronicle.Events
Assembly
Cratis.Chronicle.dll

Extension methods for working with EventType and Type .

public static class EventTypeExtensions
Inheritance
EventTypeExtensions
Inherited Members

Methods

GetEventType(Type)

Get the EventType for a CLR type.

public static EventType GetEventType(this Type type)

Parameters

type Type

Type to get for.

Returns

EventType

The EventType.

GetEventTypes(Type, IEnumerable<Type>)

Get the event types for a type.

public static IEnumerable<Type> GetEventTypes(this Type type, IEnumerable<Type> eventTypes)

Parameters

type Type

The CLR type to get for.

eventTypes IEnumerable<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

type Type

Type to check.

eventTypes IEnumerable<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

type Type

Type to validate.

Exceptions

MissingEventTypeAttribute

Thrown if type does not have the EventTypeAttribute.