public void Dispose() { #if RECORD_MODE ICustomVisionTrainingClient client = BaseTests.GetTrainingClient(false); foreach (var iter in client.GetIterations(this.ProjectId)) { if (!string.IsNullOrEmpty(iter.PublishName)) { client.UnpublishIteration(this.ProjectId, iter.Id); } } client.DeleteProject(this.ProjectId); #endif }
public static void CleanUpOldProjects(ICustomVisionTrainingClient client) { foreach (var project in client.GetProjects()) { if (project.Name.StartsWith(ProjectPrefix)) { System.Console.WriteLine("Cleaning old project: " + project.Name); foreach (var iter in client.GetIterations(project.Id)) { if (!string.IsNullOrEmpty(iter.PublishName)) { client.UnpublishIteration(project.Id, iter.Id); } } client.DeleteProject(project.Id); } } }
public void ExcluirProjeto(string idDoProjeto) { ExcluirIteracoes(idDoProjeto); _servicoCognitivoDeVisaoPersonalizadaTreinamento.DeleteProject(new Guid(idDoProjeto)); }