Пример #1
0
 static async Task CreatePersonGroup()
 {
     try
     {
         await FaceApiClient.PersonGroup.CreateAsync(_personGroupId, _personGroupName).ConfigureAwait(false);
     }
     catch (APIErrorException e) when(e.Response.StatusCode.Equals(HttpStatusCode.Conflict))
     {
         Debug.WriteLine("Person Group Already Exists");
         DebugHelpers.PrintException(e);
     }
 }
Пример #2
0
 public static async Task RemoveExistingFace(Guid userId)
 {
     UpdateActivityIndicatorStatus(true);
     try
     {
         await FaceApiClient.PersonGroupPerson.DeleteAsync(_personGroupId, userId).ConfigureAwait(false);
     }
     catch (APIErrorException e) when(e.Response.StatusCode.Equals(HttpStatusCode.NotFound))
     {
         Debug.WriteLine("Person Does Not Exist");
         DebugHelpers.PrintException(e);
     }
     finally
     {
         UpdateActivityIndicatorStatus(false);
     }
 }