public static bool DeleteTestWorkspace(Int32 workspaceID, IServicesMgr svcMgr, string userName, string password) { using (var proxy = svcMgr.GetProxy <IRSAPIClient>(userName, password)) { return(Delete(proxy, workspaceID)); } }
public static bool DeleteTestWorkspace(Int32 workspaceID, IServicesMgr svcMgr, string userName, string password) { WriteResultSet <Workspace> resultSet = null; using (var proxy = svcMgr.GetProxy <IRSAPIClient>(userName, password)) { proxy.APIOptions.WorkspaceID = -1; try { //Create a Workspace Artifact and pass to the Delete method on the repository var workspaceDTO = new kCura.Relativity.Client.DTOs.Workspace(workspaceID); resultSet = proxy.Repositories.Workspace.Delete(workspaceDTO); } catch (Exception ex) { Console.WriteLine("An error occurred deleting the Workspace: {0}", ex.Message); return(false); } if (!resultSet.Success) { Console.WriteLine("An error occurred deleting the Workspace: {0}", resultSet.Message); return(false); } return(true); } }
public async static Task <Int32> CreateWorkspaceAsync(string workspaceName, string templateName, IServicesMgr svcMgr, string userName, string password) { using (var client = svcMgr.GetProxy <IRSAPIClient>(userName, password)) { client.APIOptions.WorkspaceID = -1; return(await Task.Run(() => Create(client, workspaceName, templateName))); } }