public static IServiceCollection AddCronusAspNetCore(this IServiceCollection services, Action <CronusTenantOptions> options) { services.AddSingleton <IControllerFactory, CronusControllerFactory>(); services.AddSingleton <IAspNetTenantResolver, ResolveTenantFromTenantClaim>(); services.AddSingleton <ResolveTenantFromTenantClaim, ResolveTenantFromTenantClaim>(); var opts = new CronusTenantOptions(); options(opts); services.AddSingleton <CronusTenantOptions>(opts); return(services); }
public CronusControllerFactory(IControllerActivator controllerActivator, IEnumerable <IControllerPropertyActivator> propertyActivators, CronusTenantOptions options) { defaultControllerFactory = new DefaultControllerFactory(controllerActivator, propertyActivators); this.options = options; }