CheckConstraintTObject Constructor |
Initializes a new instance of the
CheckConstraintTObject class with
a message getter which can use the validated object for personalized messages.
Namespace:
Aloe.SystemFrameworks.Domain.Validation
Assembly:
Aloe.SystemFrameworks.Domain (in Aloe.SystemFrameworks.Domain.dll) Version: 20.1.3.5
Syntaxpublic CheckConstraint(
string constraintCode,
string name,
Func<TObject, bool> checkExpression,
Func<TObject, string> messageGetter = null,
bool executeForDeletedObject = false
)
Public Sub New (
constraintCode As String,
name As String,
checkExpression As Func(Of TObject, Boolean),
Optional messageGetter As Func(Of TObject, String) = Nothing,
Optional executeForDeletedObject As Boolean = false
)
public:
CheckConstraint(
String^ constraintCode,
String^ name,
Func<TObject, bool>^ checkExpression,
Func<TObject, String^>^ messageGetter = nullptr,
bool executeForDeletedObject = false
)
new :
constraintCode : string *
name : string *
checkExpression : Func<'TObject, bool> *
?messageGetter : Func<'TObject, string> *
?executeForDeletedObject : bool
(* Defaults:
let _messageGetter = defaultArg messageGetter null
let _executeForDeletedObject = defaultArg executeForDeletedObject false
*)
-> CheckConstraint
Parameters
- constraintCode
- Type: SystemString
The unique rule code. Usually the case number, for which the lambda was created. - name
- Type: SystemString
The name of the constraint. - checkExpression
- Type: SystemFuncTObject, Boolean
The expression, which should be checked upon validation. - messageGetter (Optional)
- Type: SystemFuncTObject, String
Lambda expression, returning error message in the current thread UI culture. - executeForDeletedObject (Optional)
- Type: SystemBoolean
if set to true [execute for deleted object].
See Also