1
0

Move FileNameGenerator to separate file

This commit is contained in:
Serghei Cebotari 2023-12-07 22:28:47 +03:00
parent a42386b373
commit 854c15111c

View File

@ -0,0 +1,19 @@
using System.Collections;
namespace Codeforces.Test;
public class FileNameGenerator : IEnumerable<object[]>
{
private readonly string inputFolder = @"../../../Input";
public IEnumerator<object[]> GetEnumerator()
{
foreach (var input in Directory.GetFiles(inputFolder))
{
string name = Path.GetFileName(input);
string output = $"../../../Output/{name}.a";
yield return new object[] { input, output };
}
}
IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
}