Struct SchemaViolation<TValue>
Namespace: AdCodicem.ValueObjects.Testing.Data
Assembly: AdCodicem.ValueObjects.Testing.Data.dll
A value the schema of a value object rules out, with the rule it breaks.
public readonly record struct SchemaViolation<TValue> : IEquatable<SchemaViolation<TValue>>
Type Parameters
TValue
The underlying type.
Implements
IEquatable<SchemaViolation<TValue>>
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
SchemaViolation(TValue, string)
A value the schema of a value object rules out, with the rule it breaks.
public SchemaViolation(TValue Value, string Rule)
Parameters
Value TValue
The value, which the type is expected to refuse.
Rule string
The rule it breaks, as the schema declares it: MinLength (15), MaxLength (34), Minimum (0),
Maximum (1000) or a closed value set.
Properties
Rule
The rule it breaks, as the schema declares it: MinLength (15), MaxLength (34), Minimum (0),
Maximum (1000) or a closed value set.
public string Rule { get; init; }
Property Value
Value
The value, which the type is expected to refuse.
public TValue Value { get; init; }
Property Value
TValue