public static PBEReadOnlyLocalizedString GetFormName(PBESpecies species, PBEForm form) { PBEDataUtils.ValidateSpecies(species, form, false); List <FormNameSearchResult> results = PBEDefaultDataProvider.Instance.QueryDatabase <FormNameSearchResult>(string.Format(QuerySpecies, "FormNames", species, PBEDataUtils.GetNameOfForm(species, form) ?? "0")); if (results.Count == 1) { return(new PBEReadOnlyLocalizedString(results[0])); } throw new InvalidDataException(); }