Tenantry ProAPI reference
HangfireProBuilderExtensions class
Namespace: Tenantry.Pro.Hangfire.Extensions · Package: Tenantry.Pro.Hangfire · API reference
Extension methods for registering Hangfire tenant-propagation services on ProBuilder<TKey>.
public static class HangfireProBuilderExtensionsMethods
AddHangfireTenantFilter<TKey>(ProBuilder<TKey>, Action<TenantPropagationOptions>?)
Registers TenantJobFilter<TKey> as a singleton in DI. After building the application, call app.UseTenantryHangfire<TKey>() to add the filter to Hangfire's GlobalJobFilters.
public static ProBuilder<TKey> AddHangfireTenantFilter<TKey>(this ProBuilder<TKey> builder, Action<TenantPropagationOptions>? configure = null) where TKey : IEquatable<TKey>, IParsable<TKey>Type parameters:
TKey: The tenant identifier type.
Parameters:
builderProBuilder<TKey>: The Pro builder.configureAction<TenantPropagationOptions>: Optional configuration of the tenant-propagation policy — in particularTenantPropagationOptions.OnMissingTenant, which controls what happens to a job that has no resolvable tenant. Defaults toWarn.
Returns: ProBuilder<TKey>: The same builder for chaining.