mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2025-01-10 00:29:23 +00:00
d15d1e0d08
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
33 lines
858 B
C#
33 lines
858 B
C#
// <copyright file="TestEvents.cs" company="Adrian Conlon">
|
|
// Copyright (c) Adrian Conlon. All rights reserved.
|
|
// </copyright>
|
|
namespace Fuse
|
|
{
|
|
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
|
|
public class TestEvents
|
|
{
|
|
private readonly List<TestEvent> container = new List<TestEvent>();
|
|
|
|
public ReadOnlyCollection<TestEvent> Container => this.container.AsReadOnly();
|
|
|
|
public void Add(TestEvent testEvent) => this.container.Add(testEvent);
|
|
|
|
public void Parse(Lines lines)
|
|
{
|
|
bool success;
|
|
do
|
|
{
|
|
var e = new TestEvent();
|
|
success = e.TryParse(lines);
|
|
if (success)
|
|
{
|
|
this.Add(e);
|
|
}
|
|
}
|
|
while (success);
|
|
}
|
|
}
|
|
}
|