internal PlaylistCollectionChangedEventArgs(IPlaylistCollection oldPlaylists, IPlaylistCollection newPlaylists) { AddedPlaylists = newPlaylists?.Select((s, i) => new ChangeCollectionItem <IPlaylist>(i, s)). Where(c => !oldPlaylists.Contains(c.Item)).ToArray() ?? new ChangeCollectionItem <IPlaylist> [0]; RemovedPlaylists = oldPlaylists?.Select((s, i) => new ChangeCollectionItem <IPlaylist>(i, s)). Where(c => !newPlaylists.Contains(c.Item)).ToArray() ?? new ChangeCollectionItem <IPlaylist> [0]; }
private void Subscribe(IPlaylistCollection playlists) { if (playlists == null) { return; } playlists.Changed += OnPlaylistsCollectionChanged; Subscribe(playlists.AsEnumerable()); }
public PlaylistsChangedEventArgs(IPlaylistCollection oldPlaylists, IPlaylistCollection newPlaylists) { OldPlaylists = oldPlaylists; NewPlaylists = newPlaylists; }