Class CannotClearNonNullableMember

Namespace
Cratis.Chronicle.Projections.ModelBound
Assembly
Cratis.Chronicle.dll

The exception that is thrown when a clear is declared for a read model member that cannot hold null.

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

Remarks

Clearing means returning a member to no value. A member declared non-nullable has no such state, and writing its type default instead - an empty string, a zero - is a different fact that the read model cannot tell apart from a real value. The declaration is therefore rejected rather than reinterpreted.

Constructors

CannotClearNonNullableMember(Type, string, Type)

The exception that is thrown when a clear is declared for a read model member that cannot hold null.

public CannotClearNonNullableMember(Type declaringType, string memberName, Type memberType)

Parameters

declaringType Type

The read model type declaring the member.

memberName string

The name of the member the clear was declared for.

memberType Type

The declared type of the member.

Remarks

Clearing means returning a member to no value. A member declared non-nullable has no such state, and writing its type default instead - an empty string, a zero - is a different fact that the read model cannot tell apart from a real value. The declaration is therefore rejected rather than reinterpreted.