diff options
author | Serghei Cebotari <serghei@cebotari.ru> | 2023-12-07 22:28:47 +0300 |
---|---|---|
committer | Serghei Cebotari <serghei@cebotari.ru> | 2023-12-07 22:28:47 +0300 |
commit | 854c15111c733b5ffbe27b9164b90678bf38faed (patch) | |
tree | ccf89e9b465fec9c34246bae92932fe0ca7849de | |
parent | a42386b3731ef05d36b3d7ae9a6c9502b5c530fe (diff) |
Move FileNameGenerator to separate file
-rw-r--r-- | Codeforces.Test/FileNameGenerator.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Codeforces.Test/FileNameGenerator.cs b/Codeforces.Test/FileNameGenerator.cs new file mode 100644 index 0000000..d73de7a --- /dev/null +++ b/Codeforces.Test/FileNameGenerator.cs @@ -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(); +}
\ No newline at end of file |