Click or drag to resize

AttributeDatabaseBaseFindAddOrUpdateAttributeValue Method

Find, add or update an attribute value.

If an attribute value with the specified id does not exist, then the function 'create' is called to create a new attribute value. If the 'create' function is null then no new attribute value is added.

If an attribute value with the specified id already exists, then the function 'update' (if not null) is called to update the attribute value.


Namespace: Demo3D.PLC.Comms.AttrDb
Assembly: PLC (in PLC.dll) Version: 19.00.00
Syntax
C#
public AttributeValue? FindAddOrUpdateAttributeValue(
	uint attributeId,
	Func<AttributeValue>? create,
	Action<AttributeValue>? update,
	out bool? created
)

Parameters

attributeId  UInt32
The attribute id to find.
create  FuncAttributeValue
A function to create a new attribute value (or null).
update  ActionAttributeValue
A function to update the existing attribute value (or null).
created  Boolean
True if the attribute was created.

Return Value

AttributeValue
The new/existing attribute (or null).

Implements

IAttributeDatabaseFindAddOrUpdateAttributeValue(UInt32, FuncAttributeValue, ActionAttributeValue, Boolean)
See Also