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; }
public virtual void Update(Tenant entity) { _tenantRepository.Update(entity); }
public virtual void Insert(Tenant entity) { _tenantRepository.Insert(entity); }
private TenantInstance StartInstance(Tenant tenant) { var instance = new TenantInstance(tenant); runningInstances.Add(instance, ShutdownInstance); Log("Started instance '{0}'", instance.Id); return instance; }