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 ITenantKeyTypeProperties
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:
visitorITenantKeyTypeVisitor<TResult>: The code that needs the key type.
Returns: TResult: What visitor returns.
ITenantInvalidator<TKey> interface
Clears everything Tenantry keeps for a tenant when the tenant changes: its cached copy with CacheTenants and what each ITenantInvalidationHandler<TKey>tenantry-itenantinvalidationhandler.md keeps, such as Tenantry.Caching's entries, cached responses and Tenantry.Options' values.
ITenantKeyTypeVisitor<TResult> interface
An extension point: for code that extends the package, such as another package that builds on it.