TenantPropagationDecision<TKey> struct
Namespace: Tenantry.Pro.BackgroundServices · Package: Tenantry.Pro · API reference
The outcome of resolving the tenant for a single job or message.
public readonly record struct TenantPropagationDecision<TKey> : IEquatable<TenantPropagationDecision<TKey>> where TKey : IEquatable<TKey>, IParsable<TKey>Type parameters
TKey: The tenant identifier type.
Implements IEquatable<TenantPropagationDecision<TKey>>.
Constructors
TenantPropagationDecision(TenantPropagationOutcome, ITenantDescriptor<TKey>?)
The outcome of resolving the tenant for a single job or message.
public TenantPropagationDecision(TenantPropagationOutcome Outcome, ITenantDescriptor<TKey>? Tenant)Parameters:
OutcomeTenantPropagationOutcome: What the integration should do.TenantITenantDescriptor<TKey>: The tenant to scope into whenOutcomeisTenantPropagationOutcome.RunInScope; otherwise null.
Properties
Outcome
What the integration should do.
public TenantPropagationOutcome Outcome { get; init; }Value: TenantPropagationOutcome
Tenant
The tenant to scope into when Outcome is TenantPropagationOutcome.RunInScope; otherwise null.
public ITenantDescriptor<TKey>? Tenant { get; init; }Value: ITenantDescriptor<TKey>
TenantContextPropagation class
Shared tenant-resolution logic for the Tenantry.Pro background-job and messaging integrations.
TenantPropagationOptions class
Configures how a tenant-context propagation integration Hangfire, MassTransit, Quartz, Rebus behaves when a job or message has no resolvable tenant — because none was attached, the attached value could not be parsed as TKey, or the tenant was not found in the store.