-
Notifications
You must be signed in to change notification settings - Fork 1
T_Ifp_Validation_ValidationRuleDelegate_1
Martin Strecker edited this page Mar 9, 2019
·
6 revisions
A class that takes a ValidationFunction(T) delegate to perform the validation. This allows to define a validation rule without the need to implement a class that derives from ValidationRule(T).
System.Object
Ifp.Validation.ValidationRuleDelegate(T)
Namespace: Ifp.Validation
Assembly: Ifp.Validation (in Ifp.Validation.dll) Version: 1.4.0
C#
public class ValidationRuleDelegate<T> : IValidationRule<T>
VB
Public Class ValidationRuleDelegate(Of T)
Implements IValidationRule(Of T)
C++
generic<typename T>
public ref class ValidationRuleDelegate : IValidationRule<T>
F#
type ValidationRuleDelegate<'T> =
class
interface IValidationRule<'T>
end
- T
- The type of the object to validate.
Name | Description | |
---|---|---|
ValidationRuleDelegate(T)(ValidationFunction(T)) | Constructs a new ValidationRuleDelegate(T) object and takes a ValidationFunction(T) delegate that does the validation. | |
ValidationRuleDelegate(T)(ValidationFunction(T), Boolean) | Constructs a new ValidationRuleDelegate(T) object and takes a ValidationFunction(T) delegate that does the validation. |
Name | Description | |
---|---|---|
CausesValidationProcessToStop |
Use the constructor ValidationRuleDelegate(T)(ValidationFunction(T), Boolean) to configure this property. Return true if the RuleBasedValidator(T) should not proceed validation tests in case this validation rule returns a ValidationOutcome with IsAnError. This is useful to prevent further processing of rules in cases where all the following rules will also fail. A typical use case is a check for objectToValidate == null . |
|
ValidationFunction | The ValidationFunction(T) passes to the constructor. |
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
ValidateObject | Implements ValidateObject(T) by delegating to the validation function passed in the constructor. |
Name | Description | |
---|---|---|
ToValidator(T) | Converts a IValidationRule(T) into an IValidator(T). (Defined by ValidationSummaryBuilderExtensions.) |
A Sandcastle Documented Class Library
Send comments on this topic to [](mailto:?Subject=A Sandcastle Documented Class Library)
-
Ifp.Validation Namespace
- CollectionValidator(T) Class
- FailureSeverity Enumeration
- IValidationRule(T) Interface
-
IValidationSummaryPresentationService Interface
-
IValidationSummaryPresentationService Methods
-
IValidationSummaryPresentationService.ShowValidationSummary Method
- IValidationSummaryPresentationService.ShowValidationSummary Method (ValidationSummary)
- IValidationSummaryPresentationService.ShowValidationSummary Method (ValidationSummary, Boolean)
- IValidationSummaryPresentationService.ShowValidationSummary Method (ValidationSummary, Boolean, String)
- IValidationSummaryPresentationService.ShowValidationSummary Method (ValidationSummary, Boolean, String, String)
-
IValidationSummaryPresentationService.ShowValidationSummary Method
-
IValidationSummaryPresentationService Methods
- IValidator(T) Interface
- RuleBasedValidator(T) Class
- SubCollectionValidator(T, U) Class
- ValidationFunction(T) Delegate
- ValidationOutcome Class
- ValidationOutcomeWithMessage Class
- ValidationRule(T) Class
- ValidationRuleDelegate(T) Class
-
ValidationSeverity Class
- ValidationSeverity Constructor
-
ValidationSeverity Properties
- ValidationSeverity.AllowsCancel Property
- ValidationSeverity.CausesCancel Property
- ValidationSeverity.Error Property
- ValidationSeverity.Information Property
- ValidationSeverity.IsAnError Property
- ValidationSeverity.SeverityAsNumber Property
- ValidationSeverity.Success Property
- ValidationSeverity.Warning Property
- ValidationSeverity Methods
- ValidationSeverity.ErrorSeverity Class
- ValidationSeverity.InformationSeverity Class
- ValidationSeverity.SuccessSeverity Class
- ValidationSeverity.WarningSeverity Class
- ValidationSummary Class
- ValidationSummaryBuilder Class
- ValidationSummaryBuilderExtensions Class
- Validator(T) Class
- ValidatorCombiner(T) Class