public static void Output(bool forceUpdate, UniformPair <EventBean[]> result, UpdateDispatchView finalView) { EventBean[] newEvents = result != null ? result.First : null; EventBean[] oldEvents = result != null ? result.Second : null; if (newEvents != null || oldEvents != null) { finalView.NewResult(result); } else if (forceUpdate) { finalView.NewResult(result); } }
public void Output(bool forceUpdate, UniformPair <EventBean[]> result, UpdateDispatchView finalView) { var newEvents = result != null ? result.First : null; var oldEvents = result != null ? result.Second : null; // route first if (_parent.IsRoute) { if ((newEvents != null) && (_parent.InsertIntoStreamSelector.Value.IsSelectsIStream())) { Route(newEvents, _agentInstanceContext); } if ((oldEvents != null) && (_parent.InsertIntoStreamSelector.Value.IsSelectsRStream())) { Route(oldEvents, _agentInstanceContext); } } // discard one side of results if (_parent.SelectStreamDirEnum == SelectClauseStreamSelectorEnum.RSTREAM_ONLY) { newEvents = oldEvents; oldEvents = null; } else if (_parent.SelectStreamDirEnum == SelectClauseStreamSelectorEnum.ISTREAM_ONLY) { oldEvents = null; // since the insert-into may require rstream } // dispatch if (newEvents != null || oldEvents != null) { finalView.NewResult(new UniformPair <EventBean[]>(newEvents, oldEvents)); } else if (forceUpdate) { finalView.NewResult(new UniformPair <EventBean[]>(null, null)); } }