Class ValueObjectPattern
Namespace: AdCodicem.ValueObjects
Assembly: AdCodicem.ValueObjects.Abstractions.dll
A generic bridge to the pattern a value object declares through
public static class ValueObjectPattern
Inheritance
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Remarks
A static abstract member is reached through a type parameter, which finds it however the value object implements
it. Named on the type, Iban.Pattern would miss an explicit implementation and fail to compile in a file the
consumer cannot edit. The JIT specializes the call for the struct, so the indirection costs nothing.
Methods
Of<TSelf>()
Gets the regular expression a value object declares.
public static Regex Of<TSelf>() where TSelf : IValueObjectPatternValidator
Returns
Its pattern.
Type Parameters
TSelf
The value object.