public static string GetEnvironmentTypeEx() { if (EnvironmentSettings.EnvTypeEx == null) { string envType; if (EnvironmentSettings.ShouldUseNewEnvironmentSettingsLogic()) { envType = EnvironmentSettings.GetEnvironmentTypeUsingNewLogic(); } else { RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("Software\\AQR"); envType = registryKey == null ? ConfigurationManager.AppSettings["Environment"] : (string)registryKey.GetValue("Environment"); } if (envType != null) { EnvironmentSettings.EnvTypeEx = "_" + envType; EnvironmentSettings.Environments?environmentFromString = EnvironmentSettings.GetEnvironmentFromString(envType); if (environmentFromString.HasValue) { EnvironmentSettings.EnvironmetType = environmentFromString.Value; } } else { EnvironmentSettings.EnvTypeEx = string.Empty; } } return(EnvironmentSettings.EnvTypeEx); }
public static string GetEnvironmentType() { if (EnvironmentSettings.EnvType == null) { string typeUsingNewLogic = EnvironmentSettings.GetEnvironmentTypeUsingNewLogic(); if (typeUsingNewLogic != null) { EnvironmentSettings.EnvType = typeUsingNewLogic == null ? "" : typeUsingNewLogic; EnvironmentSettings.Environments?environmentFromString = EnvironmentSettings.GetEnvironmentFromString(typeUsingNewLogic); if (environmentFromString.HasValue) { EnvironmentSettings.EnvironmetType = environmentFromString.Value; } } } return(EnvironmentSettings.EnvType); }