Esempio n. 1
0
 /// <summary>
 /// Removes a client object by artifact ID.
 /// </summary>
 /// <param name="clientID"></param>
 public void Delete(int clientID)
 {
     using (IClientManager proxy = _helper.GetServicesManager().CreateProxy <IClientManager>(API.ExecutionIdentity.System))
     {
         int j = 1;
         while (j <= 5)
         {
             try
             {
                 proxy.DeleteSingleAsync(clientID).Wait();
                 j++;
                 break;
             }
             catch (Exception ex)
             {
                 if (j >= 5)
                 {
                     throw new Exception("Error deleting Client", ex);
                 }
             }
         }
     }
 }
Esempio n. 2
0
 public static void Delete_Client(Relativity.Services.ServiceProxy.ServiceFactory serviceFactory, int artifactId)
 {
     using (IClientManager proxy = serviceFactory.CreateProxy <IClientManager>())
     {
         int j = 1;
         while (j <= 5)
         {
             try
             {
                 proxy.DeleteSingleAsync(artifactId).Wait();
                 j++;
                 break;
             }
             catch (Exception ex)
             {
                 if (j >= 5)
                 {
                     throw new Exception("Error deleting Client", ex);
                 }
             }
         }
     }
 }