Class UniqueAttributeExtensions
- Namespace
- Cratis.Chronicle.Events.Constraints
- Assembly
- Cratis.Chronicle.dll
Extension methods for working with UniqueAttribute.
public static class UniqueAttributeExtensions
- Inheritance
-
UniqueAttributeExtensions
- Inherited Members
Methods
GetConstraintMessage(MemberInfo)
Get the constraint message for a type adorned with UniqueAttribute, defaults to type name if not explicitly defined.
public static ConstraintViolationMessage GetConstraintMessage(this MemberInfo member)
Parameters
member
MemberInfoType to get for that has UniqueAttribute.
Returns
- ConstraintViolationMessage
Message for constraint, if defined, default if not.
GetConstraintName(MemberInfo)
Get the constraint name for a type adorned with UniqueAttribute, defaults to type name if not explicitly defined.
public static ConstraintName GetConstraintName(this MemberInfo member)
Parameters
member
MemberInfoType to get for that has UniqueAttribute.
Returns
- ConstraintName
Name of constraint.