static void ConsumeAndRecordLastSeen( LastSeen lastSeen, RecentNotifications recentNotifications, IEnumerable <TypeContract> contracts, Action <IEnumerable <IDomainEvent> > publish, RecordLastSeen recordLastSeen) { var id = Consume ( lastSeen: lastSeen, recentNotifications: recentNotifications, contracts: contracts, publish: publish )(); recordLastSeen(id); }
static LastSeen Consume( LastSeen lastSeen, RecentNotifications recentNotifications, IEnumerable <TypeContract> contracts, Action <IEnumerable <IDomainEvent> > publish) { return(() => PublishAndReturnLastSeen ( recentNotifications ( lastSeen(), contracts.Select(x => new EventName { Value = x.Value }).ToArray() ), publish )); }