public static void AddTenantScoped(this IServiceCollection serviceCollection, ITenant tenant, Type serviceType, object instance) { var tenantScopedServiceDescriptor = new TenantScopedServiceDescriptor(tenant, serviceType, instance); serviceCollection.Add(tenantScopedServiceDescriptor); }
public static void AddTenantScoped(this IServiceCollection serviceCollection, ITenant tenant, Type serviceType, Func <IServiceProvider, object> factory, ServiceLifetime serviceLifetime = ServiceLifetime.Scoped) { var tenantScopedServiceDescriptor = new TenantScopedServiceDescriptor(tenant, serviceType, factory, serviceLifetime); serviceCollection.Add(tenantScopedServiceDescriptor); }
public static void AddTenantScoped(this IServiceCollection serviceCollection, ITenant tenant, Type serviceType, Type implementationType, ServiceLifetime serviceLifetime = ServiceLifetime.Scoped) { var tenantScopedServiceDescriptor = new TenantScopedServiceDescriptor(tenant, serviceType, implementationType, serviceLifetime); serviceCollection.Add(tenantScopedServiceDescriptor); }