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 } }); } }
public override IEnumerator ReceivePayload(VisualPayload payload) { foreach (var entry in Scope.GetEntries(payload.Data)) { SelectGroups(entry); //var firstEntry = EntryField.GetEntries(payload.Data).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(payload.Data, firstEntry); //DenoteEmptyUnSelectedList(payload.Data, firstEntry); if (NewPayloadOnly.GetFirstValue(payload.Data)) { if (AllowEmptyLists.GetFirstValue(payload.Data) || SelectedList.Any()) { var iterator = SelectedSet.Transmit( new VisualPayload(new MutableObject { { SelectedListTarget.LastKey, SelectedList } }, payload.VisualData)); while (iterator.MoveNext()) { yield return(null); } } if (AllowEmptyLists.GetFirstValue(payload.Data) || UnSelectedList.Any()) { var iterator = UnSelectedSet.Transmit( new VisualPayload(new MutableObject { { UnSelectedListTarget.LastKey, UnSelectedList } }, payload.VisualData)); while (iterator.MoveNext()) { yield return(null); } } } else { SelectedListTarget.SetValue(SelectedList, entry); UnSelectedListTarget.SetValue(UnSelectedList, entry); } } if (!NewPayloadOnly.GetFirstValue(payload.Data)) { if (AllowEmptyLists.GetFirstValue(payload.Data) || SelectedList.Any()) { var iterator = SelectedSet.Transmit(payload); while (iterator.MoveNext()) { yield return(null); } } if (AllowEmptyLists.GetFirstValue(payload.Data) || UnSelectedList.Any()) { var iterator = UnSelectedSet.Transmit(payload); while (iterator.MoveNext()) { yield return(null); } } } }