internal_invokeByArrayArguments method

AsyncReply internal_invokeByArrayArguments(
  1. int index,
  2. List args
)

Implementation

AsyncReply<dynamic> internal_invokeByArrayArguments(
    int index, List<dynamic> args) {
  if (_destroyed) throw new Exception("Trying to access destroyed object");

  if (_suspended) throw new Exception("Trying to access suspended object");
  if (instance == null) throw Exception("Object not initialized.");

  var ins = instance as Instance;

  if (index >= ins.template.functions.length)
    throw new Exception("Function index is incorrect");

  return _connection?.sendInvokeByArrayArguments(
      _instanceId as int, index, args) as AsyncReply;
}