-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathValidationRule.cs
More file actions
28 lines (25 loc) · 843 Bytes
/
ValidationRule.cs
File metadata and controls
28 lines (25 loc) · 843 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
namespace ByteBard.AsyncAPI.Validations
{
using System;
/// <summary>
/// Class containing validation rule logic.
/// </summary>
public abstract class ValidationRule
{
/// <summary>
/// Element Type.
/// </summary>
internal abstract Type ElementType { get; }
/// <summary>
/// Gets or sets the AsyncAPI versions this rule applies to.
/// Null means the rule applies to all versions.
/// </summary>
public AsyncApiVersion[] ApplicableVersions { get; internal set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <param name="context">The context.</param>
/// <param name="item">The object item.</param>
internal abstract void Evaluate(IValidationContext context, object item);
}
}