internal_attach method
Implementation
bool internal_attach(List<PropertyValue> properties) {
if (_attached)
return false;
else {
_suspended = false;
//_properties = new List(properties.length); // object[properties.Length];
//_events = new DistributedResourceEvent[Instance.Template.Events.Length];
for (var i = 0; i < properties.length; i++) {
instance?.setAge(i, properties[i].age);
instance?.setModificationDate(i, properties[i].date);
_properties.add(properties[i].value);
//_properties[i] = properties[i].value;
}
// trigger holded events/property updates.
//foreach (var r in afterAttachmentTriggers)
// r.Key.Trigger(r.Value);
//afterAttachmentTriggers.Clear();
_attached = true;
if (_queued_updates.length > 0) {
_queued_updates
.forEach((kv) => internal_updatePropertyByIndex(kv.key, kv.value));
_queued_updates.clear();
}
}
return true;
}