1
0
mirror of synced 2024-11-15 01:33:51 +00:00
PettingZoo/PettingZoo.Core/Validation/IPayloadValidator.cs
Mark van Renswoude c75ea0cc62 Implemented DataAnnotation based validation for Tapeti messages
Fixed class name missing when selecting from Tapeti class
Added Filter to class selection dialog
Fixed or removed some minor todo's
2022-01-03 15:04:00 +01:00

26 lines
529 B
C#

using System;
namespace PettingZoo.Core.Validation
{
public class PayloadValidationException : Exception
{
public TextPosition? ErrorPosition { get; }
public PayloadValidationException(string message, TextPosition? errorPosition) : base(message)
{
ErrorPosition = errorPosition;
}
}
public interface IPayloadValidator
{
bool CanValidate();
/// <exception cref="PayloadValidationException" />
void Validate(string payload);
}
}