/// <summary> /// Removes an environment and it's resources from the tree /// </summary> public void RemoveEnvironment(IEnvironmentModel environment) { var idx = Environments.FindIndex(e => e.ID == environment.ID); if (idx != -1) { Environments.RemoveAt(idx); StudioResourceRepository.RemoveEnvironment(environment.ID); SelectLocalHost(); } }