public static IServiceCollection TenantForSourceIP(this TenantIdentification identification) { return(identification._services.AddScoped <ITenantIdentificationService, SourceIPTenantIdentificationService>()); }
public static IServiceCollection DynamicTenant(this TenantIdentification identification, Func <HttpContext, string> currentTenant, Func <IEnumerable <string> > allTenants) { return(identification._services.AddScoped <ITenantIdentificationService>(sp => new DynamicTenantIdentificationService(currentTenant, allTenants))); }
public static IServiceCollection TenantForQueryString(this TenantIdentification identification) { return(identification._services.AddScoped <ITenantIdentificationService, QueryStringTenantIdentificationService>()); }