Table of Contents

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 string

Optional name of the constraint to use.

message string

Optional 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

string

Name

Gets the name of the constraint.

public string? Name { get; }

Property Value

string