mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-16 07:12:27 +02:00
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
29 lines
721 B
C#
29 lines
721 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace Robust.Shared.Serialization.Markdown.Validation
|
|
{
|
|
public sealed class ValidatedSequenceNode : ValidationNode
|
|
{
|
|
public ValidatedSequenceNode(List<ValidationNode> sequence)
|
|
{
|
|
Sequence = sequence;
|
|
}
|
|
|
|
public List<ValidationNode> Sequence { get; }
|
|
|
|
public override bool Valid => Sequence.All(p => p.Valid);
|
|
|
|
public override IEnumerable<ErrorNode> GetErrors()
|
|
{
|
|
foreach (var node in Sequence)
|
|
{
|
|
foreach (var invalid in node.GetErrors())
|
|
{
|
|
yield return invalid;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|