Class CannotClearNonNullableMember
- 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
declaringTypeTypeThe read model type declaring the member.
memberNamestringThe name of the member the clear was declared for.
memberTypeTypeThe 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.