TenantInactiveException class
Namespace: Tenantry · Package: Tenantry.Core · API reference
Thrown when work is to run for a tenant that an ITenantActivityValidator<TKey> refuses, such as a suspended tenant, for example by ITenantScopeFactory<TKey>.RunInScopeAsync.
It derives from TenantNotResolvedException, so code that handles that exception handles this one too. Catch it first to skip or park work for a suspended tenant rather than treat it as a failure.
public sealed class TenantInactiveException : TenantNotResolvedException, ISerializableInherits Exception → SystemException → InvalidOperationException → TenantNotResolvedException.
Implements ISerializable.
Constructors
TenantInactiveException(object)
Initialises a new instance for the tenant that was refused.
public TenantInactiveException(object tenantId)Parameters:
tenantIdobject: The tenant's id.
TenantInactiveException(object, string)
Initialises a new instance for the tenant that was refused, with a custom message.
public TenantInactiveException(object tenantId, string message)Parameters:
tenantIdobject: The tenant's id.messagestring: The message that describes the error.
Properties
TenantId
The tenant's id, of the application's tenant key type.
public object TenantId { get; }Value: object
TenantIds class
An extension point: for code that extends the package, such as another package that builds on it.
TenantNotFoundException class
Thrown when a tenant is looked up by its id and the tenant store has no tenant with that id, for example by ITenantScopeFactory<TKey>.RunInScopeAsynctenantry-itenantscopefactory.md.