public override IEnumerator ReceivePayload(VisualPayload payload) { var groupId = GroupId.GetFirstValue(payload.Data); var singleElement = SingleObject.GetFirstValue(payload.Data); var targetElementCount = NumberOfEntries.GetFirstValue(payload.Data); if (!DataShare.ContainsKey(groupId)) { DataShare[groupId] = new List <Object>(); } DataShare[groupId].Add(singleElement); if (DataShare[groupId].Count >= targetElementCount) { var dataList = DataShare[groupId]; RecombinedListTarget.SetValue( (from obj in dataList select new MutableObject { { "Value", obj } }).ToList(), payload.Data); DataShare[groupId] = new List <Object>(); var iterator = Router.TransmitAll(payload); while (iterator.MoveNext()) { yield return(null); } } }
protected override void OnProcessOutputSchema(MutableObject newSchema) { RecombinedListTarget.SetValue(new List <MutableObject> { new MutableObject { { "Value", SingleObject.GetFirstValue(newSchema) } } }, newSchema); Router.TransmitAllSchema(newSchema); }