Class ValidationReport
- Namespace
- The.Entities.Validation
- Assembly
- Instagile.dll
The immutable result of validating an entity graph.
public sealed class ValidationReport
- Inheritance
-
ValidationReport
- Inherited Members
Properties
Findings
Every finding from the run, in evaluation order.
public IReadOnlyList<ValidationFinding> Findings { get; }
Property Value
Intent
The purpose of the validation.
public ValidationIntent Intent { get; }
Property Value
IsValid
True if the report contains no Error findings. Warnings do not affect validity.
public bool IsValid { get; }
Property Value
Level
The most severe finding level, or null if there are no findings.
public MessageLevel? Level { get; }
Property Value
Methods
Blocks(MessageLevel)
True if any finding is at or above the given level. Commands use this to gate execution.
public bool Blocks(MessageLevel gate)
Parameters
gateMessageLevel
Returns
For(IEntity)
Entity-level findings for the given entity; property-level findings are not included.
public IEnumerable<ValidationFinding> For(IEntity entity)
Parameters
entityIEntity
Returns
For(IProperty)
Findings for the given live entity property (e.g. entity.Properties.X), which identifies
both the property and the entity - so in a graph report, only that entity's findings are returned.
public IEnumerable<ValidationFinding> For(IProperty property)
Parameters
propertyIProperty
Returns
For(PropertyInfo)
Findings for the given property (e.g. EntityType.Metadata.X) on any entity in the graph.
public IEnumerable<ValidationFinding> For(PropertyInfo property)
Parameters
propertyPropertyInfo
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.