/// <summary>
        /// Add <see cref="BindingsPerTenantsRegistrationSource"/> as a <see cref="IRegistrationSource"/>.
        /// </summary>
        /// <param name="containerBuilder">The <see cref="ContainerBuilder"/>.</param>
        public static void AddBindingsPerTenantRegistrationSource(this ContainerBuilder containerBuilder)
        {
            var tenantKeyCreator   = new TenantKeyCreator(containerBuilder);
            var typeActivator      = new TypeActivator(containerBuilder);
            var instancesPerTenant = new InstancesPerTenant(tenantKeyCreator, typeActivator);

            containerBuilder.RegisterSource(new BindingsPerTenantsRegistrationSource(instancesPerTenant));
        }
示例#2
0
 /// <summary>
 /// Initializes a new instance of <see cref="BindingsPerTenantsRegistrationSource"/>
 /// </summary>
 /// <param name="instancesPerTenant"></param>
 public BindingsPerTenantsRegistrationSource(InstancesPerTenant instancesPerTenant)
 {
     _instancesPerTenant = instancesPerTenant;
 }