Docs
Tenantry CoreAPI reference

ITenantKeyType interface

Namespace: Tenantry · Package: Tenantry.Core · API reference

An extension point: for code that extends the package, such as another package that builds on it. An application rarely needs it.

The tenant key type the application registered Tenantry with, for code that has only a service provider or a service collection, such as a health check registration or a host extension, so its callers never repeat the key type. AddTenantry registers it as a singleton; services.FindTenantKeyType() reads it while services are being registered.

ITenantKeyType.Accept<TResult> calls a generic method with the key type known at compile time, so Native AOT compiles it, unlike MakeGenericType on ITenantKeyType.Type.

[EditorBrowsable(EditorBrowsableState.Advanced)]
public interface ITenantKeyType

Properties

Type

The tenant key type, such as Guid.

Type Type { get; }

Value: Type

Methods

Accept<TResult>(ITenantKeyTypeVisitor<TResult>)

Calls visitor with the tenant key type.

TResult Accept<TResult>(ITenantKeyTypeVisitor<TResult> visitor)

Type parameters:

  • TResult: What the visitor returns.

Parameters:

Returns: TResult: What visitor returns.

On this page