PropagatedTenant struct
Namespace: Tenantry.Pro · Package: Tenantry.Pro · API reference
An extension point: for code that extends the package, such as another package that builds on it. An application rarely needs it.
What ITenantPropagator resolved for a job or message: a tenant to run as (PropagatedTenant.Resolved), no tenant (PropagatedTenant.WithoutTenant), or that the work must not run (PropagatedTenant.Skipped).
[EditorBrowsable(EditorBrowsableState.Advanced)]
public readonly record struct PropagatedTenant : IEquatable<PropagatedTenant>Implements IEquatable<PropagatedTenant>.
Properties
Skip
The work must not run: the policy that applied is TenantPropagationBehavior.Skip.
public bool Skip { get; }Value: bool
Skipped
Do not run: the policy that applied is TenantPropagationBehavior.Skip.
public static PropagatedTenant Skipped { get; }Value: PropagatedTenant
Tenant
The tenant to run as, an ITenantDescriptor<TKey>, or null when the work runs without one or is skipped.
public ITenantDescriptor? Tenant { get; }Value: ITenantDescriptor
WithoutTenant
Run without a tenant.
public static PropagatedTenant WithoutTenant { get; }Value: PropagatedTenant
Methods
Resolved(ITenantDescriptor)
Run as tenant.
public static PropagatedTenant Resolved(ITenantDescriptor tenant)Parameters:
tenantITenantDescriptor: The tenant, anITenantDescriptor<TKey>of the application's tenant key type.
Returns: PropagatedTenant: The result to pass to ITenantPropagator.Use.