/// <summary> /// Gets identifiers that is ok to show to the user. /// </summary> /// <param name="isInRevision">if set to <c>true</c> the session is in revision mode.</param> /// <param name="isEditorUser">if set to <c>true</c> the user is taxon editor.</param> /// <returns>List of identifiers.</returns> public static List <TaxonNameViewModel> GetIdentfiersViewModel(this ITaxon taxon, bool isInRevision, bool isEditorUser) { List <ITaxonName> identifiers = taxon.GetIdentifiers(CoreData.UserManager.GetCurrentUser()); identifiers = identifiers.OrderBy(t => t.Category.Id).ThenBy(t => t.Status.SortOrder()).ToList(); List <TaxonNameViewModel> resultList = new List <TaxonNameViewModel>(); foreach (ITaxonName taxonName in identifiers) { if (IsNameOkToShow(taxonName, isInRevision, isEditorUser)) { resultList.Add(new TaxonNameViewModel(taxonName, taxon)); } } return(resultList); }