public LanguageManagementConfig(IIocManager iocManager, ICodeZeroStartupConfiguration configuration) { _iocManager = iocManager; _configuration = configuration; Logger = NullLogger.Instance; }
public CodeZeroRedisCacheOptions(ICodeZeroStartupConfiguration codeZeroStartupConfiguration) { CodeZeroStartupConfiguration = codeZeroStartupConfiguration; ConnectionString = GetDefaultConnectionString(); DatabaseId = GetDefaultDatabaseId(); }
/// <summary> /// Used to replace a service type. /// </summary> /// <param name="configuration">The configuration.</param> /// <param name="type">Type.</param> /// <param name="impl">Implementation.</param> /// <param name="lifeStyle">Life style.</param> public static void ReplaceService(this ICodeZeroStartupConfiguration configuration, Type type, Type impl, DependencyLifeStyle lifeStyle = DependencyLifeStyle.Singleton) { configuration.ReplaceService(type, () => { configuration.IocManager.Register(type, impl, lifeStyle); }); }
public CodeZeroUserConfigurationBuilder( IMultiTenancyConfig multiTenancyConfig, ILanguageManager languageManager, ILocalizationManager localizationManager, IFeatureManager featureManager, IFeatureChecker featureChecker, IPermissionManager permissionManager, IUserNavigationManager userNavigationManager, ISettingDefinitionManager settingDefinitionManager, ISettingManager settingManager, ICodeZeroAntiForgeryConfiguration codeZeroAntiForgeryConfiguration, ICodeZeroSession codeZeroSession, IPermissionChecker permissionChecker, IIocResolver iocResolver, ICodeZeroStartupConfiguration startupConfiguration) { MultiTenancyConfig = multiTenancyConfig; LanguageManager = languageManager; LocalizationManager = localizationManager; FeatureManager = featureManager; FeatureChecker = featureChecker; PermissionManager = permissionManager; UserNavigationManager = userNavigationManager; SettingDefinitionManager = settingDefinitionManager; SettingManager = settingManager; CodeZeroAntiForgeryConfiguration = codeZeroAntiForgeryConfiguration; CodeZeroSession = codeZeroSession; PermissionChecker = permissionChecker; _iocResolver = iocResolver; _startupConfiguration = startupConfiguration; CustomDataConfig = new Dictionary <string, object>(); }
/// <summary> /// Used to replace a service type. /// </summary> /// <typeparam name="TType">Type of the service.</typeparam> /// <typeparam name="TImpl">Type of the implementation.</typeparam> /// <param name="configuration">The configuration.</param> /// <param name="lifeStyle">Life style.</param> public static void ReplaceService <TType, TImpl>(this ICodeZeroStartupConfiguration configuration, DependencyLifeStyle lifeStyle = DependencyLifeStyle.Singleton) where TType : class where TImpl : class, TType { configuration.ReplaceService(typeof(TType), () => { configuration.IocManager.Register <TType, TImpl>(lifeStyle); }); }
/// <summary> /// Initializes a new instance of the <see cref="DbPerTenantConnectionStringResolver"/> class. /// </summary> public DbPerTenantConnectionStringResolver( ICodeZeroStartupConfiguration configuration, ICurrentUnitOfWorkProvider currentUnitOfWorkProvider, ITenantCache tenantCache) : base(configuration) { _currentUnitOfWorkProvider = currentUnitOfWorkProvider; _tenantCache = tenantCache; CodeZeroSession = NullCodeZeroSession.Instance; }
/// <summary> /// Initializes a new instance of the <see cref="DefaultConnectionStringResolver"/> class. /// </summary> public DefaultConnectionStringResolver(ICodeZeroStartupConfiguration configuration) { _configuration = configuration; }
/// <summary> /// Used to replace a service type. /// </summary> /// <typeparam name="TType">Type of the service.</typeparam> /// <param name="configuration">The configuration.</param> /// <param name="replaceAction">Replace action.</param> public static void ReplaceService <TType>(this ICodeZeroStartupConfiguration configuration, Action replaceAction) where TType : class { configuration.ReplaceService(typeof(TType), replaceAction); }
public ModuleConfigurations(ICodeZeroStartupConfiguration codeZeroConfiguration) { CodeZeroConfiguration = codeZeroConfiguration; }
public CachingConfiguration(ICodeZeroStartupConfiguration codeZeroConfiguration) { CodeZeroConfiguration = codeZeroConfiguration; _configurators = new List <ICacheConfigurator>(); }
public BackgroundJobConfiguration(ICodeZeroStartupConfiguration codeZeroConfiguration) { CodeZeroConfiguration = codeZeroConfiguration; IsJobExecutionEnabled = true; }