mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2024-09-11 19:55:21 +00:00
32 lines
719 B
C#
32 lines
719 B
C#
|
namespace Fuse
|
|||
|
{
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.IO;
|
|||
|
|
|||
|
public class Tests
|
|||
|
{
|
|||
|
public void Read(string path)
|
|||
|
{
|
|||
|
using (var file = new StreamReader(path))
|
|||
|
{
|
|||
|
this.Read(file);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public Dictionary<string, Test> Container { get; } = new Dictionary<string, Test>();
|
|||
|
|
|||
|
public void Read(StreamReader file)
|
|||
|
{
|
|||
|
while (!file.EndOfStream)
|
|||
|
{
|
|||
|
var test = new Test();
|
|||
|
test.Read(file);
|
|||
|
if (test.Valid)
|
|||
|
{
|
|||
|
this.Container.Add(test.Description, test);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|