Skip to content

Instantly share code, notes, and snippets.

@alexshyba
Created August 12, 2013 20:47
Show Gist options
  • Save alexshyba/6215045 to your computer and use it in GitHub Desktop.
Save alexshyba/6215045 to your computer and use it in GitHub Desktop.
IndexingProvider.GetHistory
Log.Info("*** IndexingProvider.GetHistory(). Starting processing history collection.", new object());
var result = new HistoryEntryCollection();
foreach (HistoryEntry entry in history)
{
IEnumerable<HistoryEntry> historyEntries = from historyEntry in history
where historyEntry.Action == entry.Action && historyEntry.ItemId == entry.ItemId &&
historyEntry.ItemLanguage == entry.ItemLanguage && historyEntry.ItemVersion == entry.ItemVersion && historyEntry.Created > entry.Created
select historyEntry;
if (historyEntries.Count() > 0)
{
continue;
}
result.Add(entry);
}
Log.Info("*** IndexingProvider.GetHistory(). Finished processing history collection.", new object());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment