Click or drag to resize

AutoNumberConstraintTMaster, TDetail Constructor

Namespace:  Aloe.SystemFrameworks.Domain.Validation
Assembly:  Aloe.SystemFrameworks.Domain (in Aloe.SystemFrameworks.Domain.dll) Version: 20.1.3.5
Syntax
public AutoNumberConstraint(
	string constraintCode,
	Func<ChildCollectionDefinition<TDetail>> getDetailCollection,
	Func<ColumnDataAttribute<TDetail, int>> getLineNumberAttribute,
	Func<ObjectReference<TMaster>> getMasterReference,
	int start = 10,
	int increment = 10
)

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