Show / Hide Table of Contents

Interface IQueryableValidationResult

An object which contains validation rule results, which may be queried for specific results.

Inherited Members
System.Collections.Generic.IEnumerable<CSF.Validation.ValidationRuleResult>.GetEnumerator()
Namespace: CSF.Validation
Assembly: CSF.Validation.Abstractions.dll
Syntax
public interface IQueryableValidationResult : IEnumerable<ValidationRuleResult>, IEnumerable

Properties

| Improve this Doc View Source

ManifestValue

Gets a reference to the manifest value which forms the logical root of the results in the current instance.

Declaration
ManifestItem ManifestValue { get; }
Property Value
Type Description
ManifestItem
| Improve this Doc View Source

Passed

Gets a value that indicates whether or not the current instance represents passing validation.

Declaration
bool Passed { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

RuleResults

Gets a collection of the results of individual validation rules, making up the current validation result.

Declaration
IReadOnlyCollection<ValidationRuleResult> RuleResults { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyCollection<ValidationRuleResult>
| Improve this Doc View Source

ValidationTime

Gets a value indicating how long the validation process took.

Declaration
TimeSpan? ValidationTime { get; }
Property Value
Type Description
System.Nullable<System.TimeSpan>
Remarks

This value will only be populated if InstrumentRuleExecution is set to true. Otherwise it will be null.

When EnableRuleParallelization is true the sum of the times reported within each InstrumentationData will likely not total the amount reported by this property. That is because many of the reported times for each of the rules will have run concurrently with other rules. On the other hand, this time does correspond to real "wall clock" time to perform validation.

Methods

| Improve this Doc View Source

AsResultFor<T>()

Gets a representation of the current queryable result as a strongly-typed queryable result.

Declaration
IQueryableValidationResult<T> AsResultFor<T>()
Returns
Type Description
IQueryableValidationResult<T>

The same conceptual queryable result, cast to a specified type.

Type Parameters
Name Description
T

The validated-type for the queryable result.

Exceptions
Type Condition
System.InvalidCastException

If the T is incompatible with the validated type for the current results.

| Improve this Doc View Source

ToSerializableResult()

Gets a representation of the current result as a serializable validation result.

Declaration
SerializableValidationResult ToSerializableResult()
Returns
Type Description
SerializableValidationResult

A copy of the current validation result, in an easily-serializable format.

Remarks

Whilst the validation result types represented by IQueryableValidationResult & IQueryableValidationResult<TValidated> are powerful and include querying/matching functionality, they are cumbersome to serialize and/or transmit via network APIs such as JSON or XML. The SerializableValidationResult trades the powerful functionality for a simplified, flattened object model which is easy to serialize, and convert to other formats such as JSON, XML or data to be persisted in a relational database.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX