2019-07-21 12:11:00 +00:00
|
|
|
|
// <copyright file="Results.cs" company="Adrian Conlon">
|
|
|
|
|
// Copyright (c) Adrian Conlon. All rights reserved.
|
|
|
|
|
// </copyright>
|
|
|
|
|
namespace Fuse
|
2019-07-20 18:17:08 +00:00
|
|
|
|
{
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
public class Results
|
|
|
|
|
{
|
|
|
|
|
private readonly Lines lines;
|
|
|
|
|
|
|
|
|
|
public Results(string path) => this.lines = new Lines(path);
|
|
|
|
|
|
2019-07-21 12:11:00 +00:00
|
|
|
|
public Dictionary<string, Result> Container { get; } = new Dictionary<string, Result>();
|
|
|
|
|
|
2019-07-20 18:17:08 +00:00
|
|
|
|
public void Read() => this.lines.Read();
|
|
|
|
|
|
|
|
|
|
public void Parse()
|
|
|
|
|
{
|
|
|
|
|
while (!this.lines.EndOfFile)
|
|
|
|
|
{
|
|
|
|
|
var result = new Result();
|
2019-07-21 08:28:49 +00:00
|
|
|
|
if (result.TryParse(this.lines))
|
2019-07-20 18:17:08 +00:00
|
|
|
|
{
|
|
|
|
|
this.Container.Add(result.Description, result);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|