Ejemplo n.º 1
0
        public override IEnumerator ReceivePayload(VisualPayload payload)
        {
            var rightListDictionary = new Dictionary <T, MutableObject>();

            foreach (var entry in RightListEntries.GetEntries(payload.Data))
            {
                var discriminant = RightDiscriminant.GetValue(entry);
                var mutable      = entry.Last();
                rightListDictionary.Add(discriminant, mutable);
            }

            foreach (var entry in LeftListScope.GetEntries(payload.Data))
            {
                var discriminant = LeftDiscriminant.GetValue(entry);
                var foundMutable = new MutableObject();
                if (rightListDictionary.ContainsKey(discriminant))
                {
                    foundMutable = rightListDictionary[discriminant];
                }
                JoinElementTarget.SetValue(foundMutable, entry);
            }

            var iterator = Router.TransmitAll(payload);

            while (iterator.MoveNext())
            {
                yield return(null);
            }
        }
Ejemplo n.º 2
0
        protected override void OnProcessOutputSchema(MutableObject newSchema)
        {
            foreach (var entry in LeftListScope.GetEntries(newSchema))
            {
                JoinElementTarget.SetValue(RightListEntries.GetEntries(newSchema).First().Last(), entry);
            }

            base.OnProcessOutputSchema(newSchema);
        }