コード例 #1
0
        private void ApplyMeetingsEvent(MeetingsEvent @event)
        {
            _readModel.Integrate(@event);

            @event.Apply(
                meetingStarted => ListenToEvents <MeetingEvent>($"Meeting-{meetingStarted.MeetingId}", ApplyMeetingEvent)
                );
        }
コード例 #2
0
        private void ApplyMeetingsEvent(MeetingsEvent @event)
        {
            @event.Apply(
                meetingStarted =>
            {
                _logger.LogInformation($"Adding Meeting {meetingStarted.MeetingId}");

                _readModelCollection.Add(meetingStarted.MeetingId, meetingStarted.Name);

                ListenToEvents <MeetingEvent>($"Meeting-{meetingStarted.MeetingId}", ApplyMeetingEvent);
            });
        }