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
reducerTypeTypeThe reducer type holding the violating method.
methodNamestringName of the violating method.
readModelTypeTypeType 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
reducerTypeTypeReducer type to check.
readModelTypeTypeType of the read model the reducer reduces to.
eventTypesIEnumerable<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.