예제 #1
0
        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);
        }
예제 #2
0
 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
            ));
 }