private bool SetEnvironmentData(List <Environment> environments) { if (environments != null && environments.Count > 0) { m_DataManager.SetEnvironmentsList(environments); var currentEnvironment = LoadEnvironments(environments, m_DataManager.GetCurrentEnvironmentName()); m_DataManager.SetCurrentEnvironment(currentEnvironment); m_DataManager.SetLastSelectedEnvironment(currentEnvironment.name); return(true); } return(false); }
private bool SetEnvironmentData(JArray environments) { if (environments != null && environments.Count > 0) { m_DataManager.SetEnvironmentsList(environments); var currentEnvironment = LoadEnvironments(environments, m_DataManager.GetCurrentEnvironmentName()); m_DataManager.SetCurrentEnvironment(currentEnvironment); m_DataManager.SetLastSelectedEnvironment(currentEnvironment["name"].Value <string>()); return(true); } else { m_DataManager.SetEnvironmentsList(environments); } return(false); }
public bool SetEnvironmentData(JArray environments, string currentEnvironmentName = "") { if (environments != null && environments.Count > 0) { m_DataManager.SetEnvironmentsList(environments); if (String.IsNullOrEmpty(currentEnvironmentName)) { currentEnvironmentName = m_DataManager.GetCurrentEnvironmentName(); } var currentEnvironment = LoadEnvironments(environments, currentEnvironmentName); m_DataManager.SetCurrentEnvironment(currentEnvironment); m_DataManager.SetLastSelectedEnvironment(currentEnvironment["name"].Value <string>()); return(true); } return(false); }