public IEnumerable <IMonthHashAndCount> GetMonthHashAndCounts(IEnumerable <IContentIdentifier> contentIdentifiers) { return (contentIdentifiers .Where(x => !_contentIdentifierGenerator.IsSystemContent(x)) .GroupBy(x => _contentMonthProvider.GetContentMonth(x.ModifiedMoment)) .Select(x => new { Month = x.Key, HashAndCount = _hashProvider.GetHashAndCount( x.OrderBy(y => y.ModifiedMoment) .ThenBy(y => y.Guid) .Select(y => Encoding.Unicode.GetBytes(y.Hash)) ), LastModifiedMoment = x.Max(y => y.ModifiedMoment) }) .OrderBy(x => x.Month) .Select(x => _monthHashAndCountFactory(x.Month, x.HashAndCount.Hash, x.HashAndCount.Count, x.LastModifiedMoment))); }