Skip to content

M_Ifp_Validation_ValidationSummaryBuilderExtensions_ToValidator__1

Martin Strecker edited this page Mar 9, 2019 · 1 revision

ValidationSummaryBuilderExtensions.ToValidator(T) Method

Converts a IValidationRule(T) into an IValidator(T).

Namespace: Ifp.Validation
Assembly: Ifp.Validation (in Ifp.Validation.dll) Version: 1.4.0

Syntax

C#

public static IValidator<T> ToValidator<T>(
	this IValidationRule<T> rule
)

VB

<ExtensionAttribute>
Public Shared Function ToValidator(Of T) ( 
	rule As IValidationRule(Of T)
) As IValidator(Of T)

C++

public:
[ExtensionAttribute]
generic<typename T>
static IValidator<T>^ ToValidator(
	IValidationRule<T>^ rule
)

F#

[<ExtensionAttribute>]
static member ToValidator : 
        rule : IValidationRule<'T> -> IValidator<'T> 

Parameters

 

rule
Type: Ifp.Validation.IValidationRule(T)
The rule that get's converted into an IValidator(T).

Type Parameters

 

T
The type of the object to validate.

Return Value

Type: IValidator(T)
An IValidator(T) that calls the rule on Validate(T).

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IValidationRule(T). When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also

Reference

ValidationSummaryBuilderExtensions Class
Ifp.Validation Namespace

Clone this wiki locally