Beispiel #1
0
 public void deleteContact(ContactItem contactItem)
 {
     try
     {
         ContactApi    contactApi = new ContactApi(session.GetApiClient());
         List <String> keys       = new List <String>();
         keys.Add(contactItem.Key);
         DeleteContactsInput  input  = new DeleteContactsInput(keys);
         DeleteContactsResult result = contactApi.DeleteContacts(input);
         if (result.Hdr.Rc == 0)
         {
             /*List<String> failedUsers = result.FailedUsers;
              * if(failedUsers.Count > 0 )
              * {
              *  throw new Exception("Error deleting contact");
              * }*/
         }
         else
         {
             throw new Exception("Error deleting contact");
         }
     } catch (Exception ex)
     {
         throw new Exception("Error deleting contact", ex);
     }
 }