Table of Contents

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

IReadOnlyList<ValidationFinding>

Intent

The purpose of the validation.

public ValidationIntent Intent { get; }

Property Value

ValidationIntent

IsValid

True if the report contains no Error findings. Warnings do not affect validity.

public bool IsValid { get; }

Property Value

bool

Level

The most severe finding level, or null if there are no findings.

public MessageLevel? Level { get; }

Property Value

MessageLevel?

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

gate MessageLevel

Returns

bool

For(IEntity)

Entity-level findings for the given entity; property-level findings are not included.

public IEnumerable<ValidationFinding> For(IEntity entity)

Parameters

entity IEntity

Returns

IEnumerable<ValidationFinding>

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

property IProperty

Returns

IEnumerable<ValidationFinding>

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

property PropertyInfo

Returns

IEnumerable<ValidationFinding>

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.