protected override bool Filter(IMappedFeature mappedFeature) { var recording = mappedFeature as Recording; bool result = (recording != null); if (result) { DateTime?recordedAt = recording.RecordedAt; result = (recordedAt != null); if (result) { var dateTime = (DateTime)recordedAt; int year = dateTime.Year; int month = dateTime.Month; if (!YearMonth.ContainsKey(year)) { YearMonth.Add(year, month); ChangeHistoricalDate(); } else { YearMonth[year] = month; } } } return(result); }