Ejemplo n.º 1
0
        protected override void OnProcessOutputSchema(MutableObject newSchema)
        {
            foreach (var entry in Scope.GetEntries(newSchema))
            {
                SelectGroups(entry);

                var firstEntry = EntryField.GetEntries(entry).First().Last();

                if (firstEntry != null)
                {
                    firstEntry = firstEntry.CloneKeys();
                }
                else
                {
                    firstEntry = new MutableObject();
                }

                if (!firstEntry.ContainsKey(ImplicitSchemaIndicator.KeyName))
                {
                    firstEntry.Add(ImplicitSchemaIndicator.KeyName, new ImplicitSchemaIndicator(this));
                }

                DenoteEmptySelectedList(newSchema, firstEntry);
                DenoteEmptyUnSelectedList(newSchema, firstEntry);

                if (!NewPayloadOnly.GetFirstValue(newSchema))
                {
                    SelectedListTarget.SetValue(SelectedList, entry);
                    UnSelectedListTarget.SetValue(UnSelectedList, entry);
                }
            }

            if (!NewPayloadOnly.GetFirstValue(newSchema))
            {
                SelectedSet.TransmitSchema(newSchema);

                UnSelectedSet.TransmitSchema(newSchema);
            }
            else
            {
                SelectedSet.TransmitSchema(new MutableObject
                {
                    { SelectedListTarget.LastKey, SelectedList }
                });
                UnSelectedSet.TransmitSchema(new MutableObject
                {
                    { UnSelectedListTarget.LastKey, UnSelectedList }
                });
            }
        }
Ejemplo n.º 2
0
        protected override void OnProcessOutputSchema(MutableObject newSchema)
        {
            SelectGroups(newSchema);


            var firstEntry = EntryField.GetEntries(newSchema).First().Last();


            if (firstEntry != null)
            {
                firstEntry = firstEntry.CloneKeys();
            }
            else
            {
                firstEntry = new MutableObject();
            }

            if (!firstEntry.ContainsKey(GroupSplitter.ImplicitSchemaIndicator.KeyName))
            {
                firstEntry.Add(GroupSplitter.ImplicitSchemaIndicator.KeyName, new GroupSplitter.ImplicitSchemaIndicator(this));
            }

            var outgoingList = SelectedList.Count == 0
                ? new List <MutableObject> {
                firstEntry
            }
                : SelectedList;

            MutableObject outgoingSchema;


            if (NewPayloadOnly.GetFirstValue(newSchema))
            {
                outgoingSchema = new MutableObject();
                outgoingSchema[EntryFieldName] = outgoingList;
            }
            else
            {
                outgoingSchema = newSchema;
                SelectedListTarget.SetValue(outgoingList, outgoingSchema);
            }


            SelectedSet.TransmitSchema(outgoingSchema);
        }