Interface IRequiresTenantContext
Marks middleware that READS the ambient tenant, and so must not run before it is established.
public interface IRequiresTenantContext
- Extension Methods
Remarks
Implementing this is how a middleware — ours or a consumer's — obtains the ordering guarantee. The hazard it closes is silent: middleware are ordered by DispatchMiddlewareStage with a STABLE sort, so two components in the same stage are ordered by registration order alone. A tenant-reading middleware registered before the establisher therefore runs OUTSIDE the ambient scope and observes no tenant, with no exception and no log.
This states the reason as well as the fact. "Runs after TenantIdentityMiddleware" records what;
IRequiresTenantContext records WHY, so the next reader does not have to reconstruct the
intent from an ordering table.