private void RemovePerson(HSPerson person) { // remove all person info _personIdToPerson.Remove(person.Id); _personNameToPerson.Remove(person.Name); _personFacesDict.Remove(person.Id); }
private void RemoveFace(HSPerson person, HSFace face) { _faceIdToFace.Remove(face.Id); _faceNameToFace.Remove(face.ImageFile); _personFacesDict[person.Id].Remove(face.Id); }
private void AddFace(HSPerson person, Guid faceId, string faceImageFile) { // create new face and add to dictionaries var face = new HSFace(faceId, faceImageFile); _faceIdToFace.Add(faceId, face); _faceNameToFace.Add(faceImageFile, face); // add face id to face list of the person var faceList = _personFacesDict[person.Id]; faceList.Add(faceId); }
public void AddPerson(Guid personId, string personName, string imageFolder) { // return if invalid parameters or person exists if (personId == Guid.Empty || string.IsNullOrEmpty(personName) || string.IsNullOrEmpty(imageFolder) || _personIdToPerson.ContainsKey(personId) || _personNameToPerson.ContainsKey(personName)) { return; } // create person and add to dictionaries var person = new HSPerson(personId, personName, imageFolder); _personIdToPerson.Add(personId, person); _personNameToPerson.Add(personName, person); _personFacesDict.Add(personId, new List <Guid>()); }