OpenTAP 9.27
API Reference
Public Member Functions | Public Attributes | Properties | List of all members
OpenTap.DelegateValidationRule Class Reference

Validation rule that takes a delegate as an argument. Used for writing error messages. More...

Inheritance diagram for OpenTap.DelegateValidationRule:
OpenTap.ValidationRule

Public Member Functions

 DelegateValidationRule (IsValidDelegateDefinition isValid, string propertyName, CustomErrorDelegateDefinition errorDelegate)
 Constructor for DelegateValidationRule. More...
 
- Public Member Functions inherited from OpenTap.ValidationRule
 ValidationRule (IsValidDelegateDefinition isValid, string errorMessage, string propertyName)
 

Public Attributes

CustomErrorDelegateDefinition ErrorDelegate
 The delegate producing the error message.
 

Properties

override string ErrorMessage [getset]
 The error calculated from ErrorDelegate.
 
- Properties inherited from OpenTap.ValidationRule
string PropertyName [getset]
 Name of the property affected by this rule.
 
virtual string ErrorMessage [getset]
 Error message to use if the property does not follow the rule.

 
IsValidDelegateDefinition IsValid [getset]
 Rule function following the signature () -> bool.

 

Detailed Description

Validation rule that takes a delegate as an argument. Used for writing error messages.

Constructor & Destructor Documentation

◆ DelegateValidationRule()

OpenTap.DelegateValidationRule.DelegateValidationRule ( IsValidDelegateDefinition  isValid,
string  propertyName,
CustomErrorDelegateDefinition  errorDelegate 
)
inline

Constructor for DelegateValidationRule.

Parameters
isValidValidation delegate.
propertyNameTarget property.
errorDelegateFunction creating the error message.

OpenTAP 9.27 API built Wed Nov 27 2024 13:14:45