Example #1
0
 public static IServiceCollection TenantForSourceIP(this TenantIdentification identification)
 {
     return(identification._services.AddScoped <ITenantIdentificationService, SourceIPTenantIdentificationService>());
 }
Example #2
0
 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)));
 }
Example #3
0
 public static IServiceCollection TenantForQueryString(this TenantIdentification identification)
 {
     return(identification._services.AddScoped <ITenantIdentificationService, QueryStringTenantIdentificationService>());
 }