AutoNumberConstraintTMaster, TDetail Constructor |
Namespace:
Aloe.SystemFrameworks.Domain.Validation
Assembly:
Aloe.SystemFrameworks.Domain (in Aloe.SystemFrameworks.Domain.dll) Version: 20.1.3.5
Syntaxpublic AutoNumberConstraint(
string constraintCode,
Func<ChildCollectionDefinition<TDetail>> getDetailCollection,
Func<ColumnDataAttribute<TDetail, int>> getLineNumberAttribute,
Func<ObjectReference<TMaster>> getMasterReference,
int start = 10,
int increment = 10
)
Public Sub New (
constraintCode As String,
getDetailCollection As Func(Of ChildCollectionDefinition(Of TDetail)),
getLineNumberAttribute As Func(Of ColumnDataAttribute(Of TDetail, Integer)),
getMasterReference As Func(Of ObjectReference(Of TMaster)),
Optional start As Integer = 10,
Optional increment As Integer = 10
)
public:
AutoNumberConstraint(
String^ constraintCode,
Func<ChildCollectionDefinition<TDetail>^>^ getDetailCollection,
Func<ColumnDataAttribute<TDetail, int>^>^ getLineNumberAttribute,
Func<ObjectReference<TMaster>^>^ getMasterReference,
int start = 10,
int increment = 10
)
new :
constraintCode : string *
getDetailCollection : Func<ChildCollectionDefinition<'TDetail>> *
getLineNumberAttribute : Func<ColumnDataAttribute<'TDetail, int>> *
getMasterReference : Func<ObjectReference<'TMaster>> *
?start : int *
?increment : int
(* Defaults:
let _start = defaultArg start 10
let _increment = defaultArg increment 10
*)
-> AutoNumberConstraint
Parameters
- constraintCode
- Type: SystemString
The unique code of the constraint. - getDetailCollection
- Type: SystemFuncChildCollectionDefinitionTDetail
Func, which gets the details collection of the master object. - getLineNumberAttribute
- Type: SystemFuncColumnDataAttributeTDetail, Int32
Func, which gets the line number attribute of the detail object. - getMasterReference
- Type: SystemFuncObjectReferenceTMaster
Func, which gets the master reference of the detail object. - start (Optional)
- Type: SystemInt32
The first number to assign when starting in an empty master object. - increment (Optional)
- Type: SystemInt32
The number increment for subsequent line numbers.
Remarks
The attributes are provided with Func, because attributes are usually initialized statically and
the order of initialization between the attributes and the constraint is unknown.
See Also