composePropertyValueArray static method

DC composePropertyValueArray(
  1. List<PropertyValue> array,
  2. DistributedConnection connection, [
  3. bool prependLength = false
])
Compose an array of property values. PropertyValue array. DistributedConnection is required to check locality. If True, prepend the length as UInt32 at the beginning of the output. //, bool includeAge = true

Implementation

static DC composePropertyValueArray(
    List<PropertyValue> array, DistributedConnection connection,
    [bool prependLength = false]) {
  var rt = new BinaryList();

  for (var i = 0; i < array.length; i++)
    rt.addDC(composePropertyValue(array[i], connection));
  if (prependLength) rt.insertUint32(0, rt.length);

  return rt.toDC();
}