Interface IQueryableValidationResult<TValidated>
A strongly-typed specialisation of IQueryableValidationResult.
Inherited Members
Namespace: CSF.Validation
Assembly: CSF.Validation.Abstractions.dll
Syntax
public interface IQueryableValidationResult<TValidated> : IQueryableValidationResult, IEnumerable<ValidationRuleResult>, IEnumerable
Type Parameters
Name | Description |
---|---|
TValidated |
Methods
| Improve this Doc View SourceForMatchingMemberItem<TItem>(Expression<Func<TValidated, IEnumerable<TItem>>>, TItem)
Gets a subset of the current validation result, including only results applicable to a collection item that matches the specified item.
Declaration
IQueryableValidationResult<TItem> ForMatchingMemberItem<TItem>(Expression<Func<TValidated, IEnumerable<TItem>>> memberExpression, TItem item)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.Expression<System.Func<TValidated, System.Collections.Generic.IEnumerable<TItem>>> | memberExpression | A expression indicating a member of the validated object, which returns a collection of values. |
TItem | item | The item (of the collection) for which a result is to be filtered |
Returns
Type | Description |
---|---|
IQueryableValidationResult<TItem> | A queryable result, filtered for results applicable to the specified item of a collection, and its descendents. |
Type Parameters
Name | Description |
---|---|
TItem |
ForMember<TItem>(Expression<Func<TValidated, TItem>>)
Gets a subset of the current validation result, including only results applicable to the specified member and descendent members.
Declaration
IQueryableValidationResult<TItem> ForMember<TItem>(Expression<Func<TValidated, TItem>> memberExpression)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.Expression<System.Func<TValidated, TItem>> | memberExpression | A expression indicating a member of the validated object, which returns a value. |
Returns
Type | Description |
---|---|
IQueryableValidationResult<TItem> | A queryable result, filtered for results applicable to the specified member and its descendents. |
Type Parameters
Name | Description |
---|---|
TItem | The type of the member item. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If the |
System.ArgumentException | If the ManifestValue has no child values with the same name as the |
ForOnlyThisValue()
Gets a subset of the current validation result, including rule results only for the current value. Any rule results for descendent values are excluded.
Declaration
IQueryableValidationResult<TValidated> ForOnlyThisValue()
Returns
Type | Description |
---|---|
IQueryableValidationResult<TValidated> | A queryable result, filtered for only rules directly associated with the current value. |
PolymorphicAs<TDerived>()
'Casts' the current validation result for an object of type TDerived
, enabling access to
rules and values added as part of polymorphic validation.
Declaration
IQueryableValidationResult<TDerived> PolymorphicAs<TDerived>()
where TDerived : TValidated
Returns
Type | Description |
---|---|
IQueryableValidationResult<TDerived> | A queryable result, enabling access to members and rules for the derived type.. |
Type Parameters
Name | Description |
---|---|
TDerived | A derived validated type. |
WithoutSuccesses()
Gets a subset of the current validation result, excluding any results which relate to a success.
Declaration
IQueryableValidationResult<TValidated> WithoutSuccesses()
Returns
Type | Description |
---|---|
IQueryableValidationResult<TValidated> | A queryable result, filtered for only rule results that do not indicate success. |