Ejemplo n.º 1
0
        public static void AddTenantScoped(this IServiceCollection serviceCollection,
                                           ITenant tenant,
                                           Type serviceType,
                                           object instance)
        {
            var tenantScopedServiceDescriptor = new TenantScopedServiceDescriptor(tenant, serviceType, instance);

            serviceCollection.Add(tenantScopedServiceDescriptor);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }