Class UniqueAttribute
- Namespace
- Cratis.Chronicle.Events.Constraints
- Assembly
- Cratis.Chronicle.dll
Attribute to adorn types and properties on event types to indicate uniqueness.
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Property, AllowMultiple = false)]
public sealed class UniqueAttribute : Attribute
- Inheritance
-
UniqueAttribute
- Inherited Members
Constructors
UniqueAttribute(string?, string?)
Attribute to adorn types and properties on event types to indicate uniqueness.
public UniqueAttribute(string? name = null, string? message = null)
Parameters
name
stringOptional name of the constraint to use.
message
stringOptional message to use when the unique constraint is violated.
Properties
Message
Gets the message to use when the unique constraint is violated.
public string? Message { get; }
Property Value
Name
Gets the name of the constraint.
public string? Name { get; }