Ejemplo n.º 1
0
        public ThemeConfiguration GetTenantThemeConfiguration(Tenant tenant)
        {
            ThemeConfiguration config = _themeConfigs.SingleOrDefault(x => x.ThemeName.Equals(defaultTheme, StringComparison.InvariantCultureIgnoreCase));
            
            var _tenantSetting = _settingService.LoadSetting<TenantSettings>();
            if (!string.IsNullOrEmpty(_tenantSetting.DefaultTheme))
            {
                var tenantID = tenant.ID.ToString();
                var themeName = _tenantSetting.DefaultTheme;
                var themeConfig = _themeConfigs
                        .SingleOrDefault(x =>
                            (x.AvailableToTenants.Any(a => a == "*") || x.AvailableToTenants.Any(a => a == tenantID))
                            && x.ThemeName.Equals(themeName, StringComparison.InvariantCultureIgnoreCase));

                if (themeConfig != null && !string.IsNullOrEmpty(themeConfig.ThemeName))
                    config = themeConfig;
            }
            
            return config;
        }
Ejemplo n.º 2
0
 public virtual void Update(Tenant entity)
 {
     _tenantRepository.Update(entity);
 }
Ejemplo n.º 3
0
 public virtual void Insert(Tenant entity)
 {
     _tenantRepository.Insert(entity);
 }
Ejemplo n.º 4
0
        private TenantInstance StartInstance(Tenant tenant)
        {
            var instance = new TenantInstance(tenant);
            runningInstances.Add(instance, ShutdownInstance);

            Log("Started instance '{0}'", instance.Id);
            return instance;
        }