2019-07-21 12:12:28 +00:00
|
|
|
|
// <copyright file="TestEvents.cs" company="Adrian Conlon">
|
|
|
|
|
// Copyright (c) Adrian Conlon. All rights reserved.
|
|
|
|
|
// </copyright>
|
|
|
|
|
namespace Fuse
|
2019-07-19 22:59:32 +00:00
|
|
|
|
{
|
|
|
|
|
using System.Collections.Generic;
|
2019-07-21 08:10:45 +00:00
|
|
|
|
using System.Collections.ObjectModel;
|
2019-07-19 22:59:32 +00:00
|
|
|
|
|
|
|
|
|
public class TestEvents
|
|
|
|
|
{
|
2019-07-21 08:10:45 +00:00
|
|
|
|
private readonly List<TestEvent> container = new List<TestEvent>();
|
|
|
|
|
|
|
|
|
|
public ReadOnlyCollection<TestEvent> Container => this.container.AsReadOnly();
|
2019-07-19 22:59:32 +00:00
|
|
|
|
|
2019-07-20 18:17:08 +00:00
|
|
|
|
public void Parse(Lines lines)
|
2019-07-19 22:59:32 +00:00
|
|
|
|
{
|
2019-07-21 08:28:49 +00:00
|
|
|
|
var success = false;
|
2019-07-19 22:59:32 +00:00
|
|
|
|
do
|
|
|
|
|
{
|
|
|
|
|
var e = new TestEvent();
|
2019-07-21 08:28:49 +00:00
|
|
|
|
success = e.TryParse(lines);
|
|
|
|
|
if (success)
|
2019-07-19 22:59:32 +00:00
|
|
|
|
{
|
2019-07-21 08:10:45 +00:00
|
|
|
|
this.container.Add(e);
|
2019-07-19 22:59:32 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2019-07-21 08:28:49 +00:00
|
|
|
|
while (success);
|
2019-07-19 22:59:32 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|