Docs
Tenantry CoreAPI reference

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, ISerializable

Inherits Exception → SystemException → InvalidOperationException → TenantNotResolvedException.

Implements ISerializable.

Constructors

TenantInactiveException(object)

Initialises a new instance for the tenant that was refused.

public TenantInactiveException(object tenantId)

Parameters:

  • tenantId object: 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:

  • tenantId object: The tenant's id.
  • message string: 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

On this page