Skip to main content
Version: 0.3.x (0.3.0)

Interface IEntityIdVisitor<TResult>

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

Receives the type of an entity identifier that a caller knows only by its descriptor, so that the caller closes its own generic code over it at compile time.

public interface IEntityIdVisitor<out TResult>

Type Parameters​

TResult

What the visitor hands back: the adapter it built, a flag.

Remarks​

calls with the type the descriptor was built for, as hands a value object's type arguments to an . An integration that finds identifiers in creates its adapter there, new MyGenerator<TId>(), where would close it at run time, which native AOT cannot do for a struct; and it reaches the members only an identifier has, among them, through the constraint.

Methods​

Visit<TId>()​

Receives the type of the identifier.

TResult Visit<TId>() where TId : struct, IEntityId<TId>

Returns​

TResult

What the visitor builds for the identifier.

Type Parameters​

TId

The identifier type.