Hi! Recently I hinted that I was thinking of trying out beers other than IPA :) Well, I did and I’ve to admit I made a good decision. I had a few pints of Patio Pale Ale by Migration Brewing and it was quite delicious :) Not tasty as their Lucious IPA though, but good for summer!

Code for this post is in branch: learning-unbeered-11.

In this update, I created two new notification classes - HadTooManyBeersNotification and HadBeersConsecutivelyNotification. In the previous post, I was writing to the console directly when those conditions were met. Instead this time, events are published of the fact! With this, in place we now enable multiple subscribers to react upon those events. If you look at ReportTooManyBeers.cs, it now handles those two new events and write to console.

Whats next?

Now that the above two events are in place, lets start tracking/saving when these events occur. i.e track the days that I have too many beers in separate collection/store. Also track when I consecutively have beers! One of the benefits of storing this separately is that when I want to look at the report of these occurrences, I can just return the entire collection rather than having to iterate/query every single daily entry and filter out the ones that match the criteria!