public override IEnumerator ReceivePayload(VisualPayload payload) { foreach (var entry in ArrayTarget.GetEntries(payload.Data)) { var numberOfInts = NumberOfInts.GetValue(entry); var outMutable = new List <MutableObject>(); for (int i = 0; i < numberOfInts; i++) { outMutable.Add(new MutableObject() { { "Index", i } }); } ArrayTarget.SetValue(outMutable, entry); } var iterator = Router.TransmitAll(payload); while (iterator.MoveNext()) { yield return(null); } }
protected override void OnProcessOutputSchema(MutableObject newSchema) { foreach (var entry in ArrayTarget.GetEntries(newSchema)) { var numberOfInts = 1; var outMutable = new List <MutableObject>(); for (int i = 0; i < numberOfInts; i++) { outMutable.Add(new MutableObject() { { "Index", i } }); } ArrayTarget.SetValue(outMutable, entry); } base.OnProcessOutputSchema(newSchema); }