Click or drag to resize

CAEXSequenceOfCAEXObjectsTInsert Method

Inserts the specified element into this sequence. If nothing is specified the element is added. If the asFirst is set to true, the element is prepended to already existing ones. If a UniqueNameService can be located, the name of the inserted element is changed to be unique.

Namespace: Aml.Engine.CAEX
Assembly: Aml.Engine (in Aml.Engine.dll) Version: 3.2
Syntax
public override T Insert(
	T sourceCAEXObject,
	bool asFirst = true
)

Parameters

sourceCAEXObject  T
The CAEX object.
asFirst  Boolean  (Optional)
optional parameter, if set to true (default) the element is prepended to already existing ones, otherwise it is appended.

Return Value

T
The inserted CAEX object. If the provided CAEX object already belongs to a sequence, a copy of the CAEX object is inserted and returned as the result.
Exceptions
ExceptionCondition
ArgumentNullExceptioncaexObject
Remarks
If the provided CAEX object already has an associated parent, a deep copy of the CAEX object and not the original provided CAEX Object is inserted. Please keep in mind, that the copied object contains identical attributes and elements. It might not represent a valid AutomationML object, because IDs and references are not automatically modified.
See Also