Table of Contents

Interface ITenantContextAccessor

Namespace
Millrace.Tenancy
Assembly
Millrace.dll

Captures the ambient tenant at enqueue/start time and restores it inside worker execution scopes, so consumer code (and its data filters) sees the right tenant (ARCHITECTURE.md ยง8). Single-tenant applications never touch this โ€” the default implementation flows null and jobs carry no tenant id.

public interface ITenantContextAccessor

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.