public IEnumerable persons() { foreach (var group in Api.GetGroups()) { foreach (var person in Api.GetPersons(group.Name)) { yield return(person); } } }
public static Person IdentifyPerson(this IFaceApi api, string imageDataUrl, string groupName, double confidenceThreshold = 0.6) { var candidate = api.IdentifyCandidates(imageDataUrl, groupName).FirstOrDefault(); if (candidate?.Confidence > confidenceThreshold) { return((Person)api.GetPersons(groupName).Where(x => x.Id == candidate.PersonId).FirstOrDefault()); } return(null); }
protected virtual System.Collections.IEnumerable GetRecords() { if (Api != null) { var groupName = (string)Cache.GetValue(Cache.Current, nameof(Person.groupName)); if (groupName != null) { return(Api.GetPersons(groupName).Where(x => string.IsNullOrEmpty(x.Name) == false)); } } return(Enumerable.Empty <Person>()); }
public IEnumerable persons() { var group = Groups.Current; if (string.IsNullOrEmpty(group?.Name)) { return(Enumerable.Empty <Person>()); } if (Groups.Cache.GetStatus(group) == PXEntryStatus.Inserted) { return(Enumerable.Empty <Person>()); } return(Api.GetPersons(group.Name)); }