DetailCheckConstraintTMaster, TDetail Constructor (String, String, FuncTMaster, IEnumerableTDetail, FuncTDetail, Boolean, FuncTDetail, String, ActionTMaster, FuncIDataAttribute) |
Namespace:
Aloe.SystemFrameworks.Domain.Validation
Assembly:
Aloe.SystemFrameworks.Domain (in Aloe.SystemFrameworks.Domain.dll) Version: 20.1.3.5
Syntaxpublic DetailCheckConstraint(
string constraintCode,
string name,
Func<TMaster, IEnumerable<TDetail>> getDetails,
Func<TDetail, bool> detailCheck,
Func<TDetail, string> getMessage,
Action<TMaster> preOpt = null,
Func<IDataAttribute> getAttribute = null
)
Public Sub New (
constraintCode As String,
name As String,
getDetails As Func(Of TMaster, IEnumerable(Of TDetail)),
detailCheck As Func(Of TDetail, Boolean),
getMessage As Func(Of TDetail, String),
Optional preOpt As Action(Of TMaster) = Nothing,
Optional getAttribute As Func(Of IDataAttribute) = Nothing
)
public:
DetailCheckConstraint(
String^ constraintCode,
String^ name,
Func<TMaster, IEnumerable<TDetail>^>^ getDetails,
Func<TDetail, bool>^ detailCheck,
Func<TDetail, String^>^ getMessage,
Action<TMaster>^ preOpt = nullptr,
Func<IDataAttribute^>^ getAttribute = nullptr
)
new :
constraintCode : string *
name : string *
getDetails : Func<'TMaster, IEnumerable<'TDetail>> *
detailCheck : Func<'TDetail, bool> *
getMessage : Func<'TDetail, string> *
?preOpt : Action<'TMaster> *
?getAttribute : Func<IDataAttribute>
(* Defaults:
let _preOpt = defaultArg preOpt null
let _getAttribute = defaultArg getAttribute null
*)
-> DetailCheckConstraint
Parameters
- constraintCode
- Type: SystemString
The constraint code. - name
- Type: SystemString
The name. - getDetails
- Type: SystemFuncTMaster, IEnumerableTDetail
The get details function, see GetDetails. - detailCheck
- Type: SystemFuncTDetail, Boolean
The detail check function. Should return if the data is valid, see DetailCheck. - getMessage
- Type: SystemFuncTDetail, String
The get message function, see GetMessage. - preOpt (Optional)
- Type: SystemActionTMaster
The pre opt action, see PreOpt. - getAttribute (Optional)
- Type: SystemFuncIDataAttribute
The get attribute function, see GetAttribute.
See Also