Table of Contents

Class AmbientTenantContextAccessor

Namespace
Millrace.Tenancy
Assembly
Millrace.dll

Default ITenantContextAccessor: an AsyncLocal<T> ambient value.

public sealed class AmbientTenantContextAccessor : ITenantContextAccessor
Inheritance
AmbientTenantContextAccessor
Implements
Inherited Members

Properties

TenantId

The current ambient tenant id, or null when single-tenant.

Methods

BeginScope(string?)

Makes tenantId ambient until the returned scope is disposed. Workers call this before resolving a job's target so execution observes the tenant the job was enqueued under.