Skip to main content
Version: Preview (0.3.0-preview.205)

Class EntityIdDescriptor

Namespace: AdCodicem.ValueObjects.Identifiers
Assembly: AdCodicem.ValueObjects.Identifiers.dll

Runtime description of one entity identifier type, reachable from its prefix alone.

public sealed class EntityIdDescriptor

Inheritance​

object ← EntityIdDescriptor

Inherited Members​

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Remarks​

The delegate it carries operates on boxed values, which is acceptable for the same reason it is on : this is the path taken by callers that only know a prefix at run time — a webhook dispatcher, a deep link, an audit trail. Request paths that know their type go through the static members of and stay fully typed.

Properties​

Granularity​

Gets the width of the time bucket heading the body.

public IdGranularity Granularity { get; }

Property Value​

IdGranularity

Length​

Gets the exact length of an identifier of this type, which is also the width of its database column.

public int Length { get; }

Property Value​

int

Prefix​

Gets the prefix the type claims, without its trailing separator.

public string Prefix { get; }

Property Value​

string

TryParse​

Gets the non-throwing text parser, producing a boxed identifier.

public BoxedTryParse TryParse { get; }

Property Value​

BoxedTryParse

ValueObjectType​

Gets the identifier type.

public Type ValueObjectType { get; }

Property Value​

Type

Methods​

For<TSelf>()​

Builds a descriptor, resolving every operation statically.

public static EntityIdDescriptor For<TSelf>() where TSelf : struct, IEntityId<TSelf>

Returns​

EntityIdDescriptor

The descriptor.

Type Parameters​

TSelf

Identifier type.