public IEnumerable <WorkflowItemEvent> AllLambdaEvents(LambdaItem lambdaItem) { var allEvents = new List <WorkflowItemEvent>(); foreach (var historyEvent in AllEventsInDescOrderOfEventId) { var lambdaEvent = historyEvent.LambdaEvent(_workflowTask.AllEvents); if (lambdaEvent == null) { continue; } if (lambdaEvent.IsFor(lambdaItem) && !lambdaEvent.InChainOf(allEvents)) { allEvents.Add(lambdaEvent); yield return(lambdaEvent); } } }
public WorkflowItemEvent LastLambdaEvent(LambdaItem lambdaItem) { return(AllLambdaEvents(lambdaItem).FirstOrDefault(e => !LastEventFilters.Lambda.Contains(e))); }