public CandleBridgeController(Calendar calendar, ApplicationSettings settings) { if (calendar == null) { throw new ArgumentNullException("calendar"); } if (settings == null) { throw new ArgumentNullException("settings"); } Calendar = calendar; Settings = settings; }
private bool ShouldTurnOnCandleBridge(CandleBridgeSetting candleBridge, Calendar calendar) { return calendar.Events.Any(calendarEvent => calendarEvent.Summary.Equals(candleBridge.Name) && calendarEvent.Ongoing); }