private void CheckUpdates() { List <LiveUpdate> oldList = updates; List <LiveUpdate> newList = GetUpdates(); if (Lists.ListDiff(oldList, newList, out List <LiveUpdate> added, out List <LiveUpdate> removed)) { // Event handler to alert the calling app that the list has changed. --Kris LiveThreadUpdatesUpdateEventArgs args = new LiveThreadUpdatesUpdateEventArgs { OldUpdates = oldList, NewUpdates = newList, Added = added, Removed = removed }; OnUpdatesUpdated(args); } }
protected virtual void OnUpdatesUpdated(LiveThreadUpdatesUpdateEventArgs e) { UpdatesUpdated?.Invoke(this, e); }
private void C_LiveThreadUpdatesUpdated(object sender, LiveThreadUpdatesUpdateEventArgs e) { LiveThreadUpdates.AddRange(e.Added); }