Пример #1
0
        protected override void OnProcessOutputSchema(MutableObject newSchema)
        {
            foreach (var entry in EntriesList.GetEntries(newSchema))
            {
                var elementList  = EntriesList.GetValue(entry).ToList();
                var elementCount = elementList.Count;
                NumberOfEntriesTarget.SetValue(elementCount, entry);

                if (elementCount == 0)
                {
                    throw new Exception("Can't act on an empty list!");
                }
                SingleEntryTarget.SetValue(elementList.First(), entry);
            }

            Router.TransmitAllSchema(newSchema);
        }
Пример #2
0
        public override IEnumerator ReceivePayload(VisualPayload payload)
        {
            foreach (var entry in EntriesList.GetEntries(payload.Data))
            {
                var elementList  = EntriesList.GetValue(entry).ToList();
                var elementCount = elementList.Count;
                NumberOfEntriesTarget.SetValue(elementCount, entry);

                foreach (var element in elementList)
                {
                    SingleEntryTarget.SetValue(element, entry);
                    var iterator = PerEntryState.Transmit(payload);
                    while (iterator.MoveNext())
                    {
                        yield return(null);
                    }
                }
            }
        }