iipRequestInvokeFunctionArrayArguments method
void
iipRequestInvokeFunctionArrayArguments(
- int callback,
- int resourceId,
- int index,
- DC content,
)
Implementation
void iipRequestInvokeFunctionArrayArguments(
int callback, int resourceId, int index, DC content) {
Warehouse.getById(resourceId).then((r) {
if (r != null) {
Codec.parseVarArray(content, 0, content.length, this).then((arguments) {
var ft = r.instance?.template.getFunctionTemplateByIndex(index);
if (ft != null) {
if (r is DistributedResource) {
var rt = r.internal_invokeByArrayArguments(index, arguments);
if (rt != null) {
rt.then((res) {
sendReply(
IIPPacketAction.InvokeFunctionArrayArguments, callback)
..addDC(Codec.compose(res, this))
..done();
});
} else {
// function not found on a distributed object
}
} else {
var fi = null; //r.GetType().GetTypeInfo().GetMethod(ft.name);
if (fi != null) {
} else {
// ft found, fi not found, this should never happen
}
}
} else {
// no function at this index
}
});
} else {
// no resource with this id
}
});
}