Class ReducerMethodCurrentReadModelMustBeNullable

Namespace
Cratis.Chronicle.Reducers.Validators
Assembly
Cratis.Chronicle.dll

Exception that gets thrown when a reducer method declares its current read model parameter as non-nullable.

public class ReducerMethodCurrentReadModelMustBeNullable : Exception, ISerializable
Inheritance
ReducerMethodCurrentReadModelMustBeNullable
Implements
Inherited Members
Extension Methods

Remarks

Initializes a new instance of ReducerMethodCurrentReadModelMustBeNullable.

Constructors

ReducerMethodCurrentReadModelMustBeNullable(Type, string, Type)

Exception that gets thrown when a reducer method declares its current read model parameter as non-nullable.

public ReducerMethodCurrentReadModelMustBeNullable(Type reducerType, string methodName, Type readModelType)

Parameters

reducerType Type

The reducer type holding the violating method.

methodName string

Name of the violating method.

readModelType Type

Type of the read model the reducer reduces to.

Remarks

Initializes a new instance of ReducerMethodCurrentReadModelMustBeNullable.

Methods

ThrowIfAnyMethodHasNonNullableCurrentReadModel(Type, Type, IEnumerable<Type>)

Throw if any reducer-shaped method on the type declares a non-nullable current read model parameter.

public static void ThrowIfAnyMethodHasNonNullableCurrentReadModel(Type reducerType, Type readModelType, IEnumerable<Type> eventTypes)

Parameters

reducerType Type

Reducer type to check.

readModelType Type

Type of the read model the reducer reduces to.

eventTypes IEnumerable<Type>

Known event types in the process.

Exceptions

ReducerMethodCurrentReadModelMustBeNullable

Thrown when a method would never be dispatched to because of its current read model parameter.