public IEnumerable <WorkflowItemEvent> LastSimilarEvents() { WorkflowItemEvent lastEvent = null; foreach (var @event in AllEvents()) { lastEvent = lastEvent ?? @event; if (lastEvent.GetType() == @event.GetType()) { yield return(@event); } else { yield break; } } }
public bool Contains(WorkflowItemEvent @event) => _filterOutTypes.Contains(@event.GetType());