public void TearDown() { if (Directory.Exists(BuildArtifacts.BaseDirectory)) { Directory.Delete(BuildArtifacts.BaseDirectory, true); } BuildArtifacts.Clear(); }
public void TearDown() { if (!Directory.Exists(BuildArtifacts.BaseDirectory)) { return; } var currentArtifactFiles = Directory.GetFiles(BuildArtifacts.BaseDirectory, "*.json", SearchOption.TopDirectoryOnly); foreach (var file in currentArtifactFiles.Except(m_LastArtifactFiles ?? Enumerable.Empty <string>())) { File.Delete(file); } BuildArtifacts.Clear(); }