public void Handle(BookFileRetaggedEvent message) { var retagMessage = new BookRetagMessage { Message = GetTrackRetagMessage(message.Author, message.BookFile, message.Diff), Author = message.Author, Book = message.BookFile.Edition.Value.Book.Value, BookFile = message.BookFile, Diff = message.Diff, Scrubbed = message.Scrubbed }; foreach (var notification in _notificationFactory.OnTrackRetagEnabled()) { if (ShouldHandleArtist(notification.Definition, message.Author)) { notification.OnTrackRetag(retagMessage); } } }
public void Handle(TrackFileRetaggedEvent message) { var retagMessage = new TrackRetagMessage { Message = GetTrackRetagMessage(message.Artist, message.TrackFile, message.Diff), Artist = message.Artist, Album = message.TrackFile.Album, Release = message.TrackFile.Tracks.Value.First().AlbumRelease.Value, TrackFile = message.TrackFile, Diff = message.Diff, Scrubbed = message.Scrubbed }; foreach (var notification in _notificationFactory.OnTrackRetagEnabled()) { if (ShouldHandleArtist(notification.Definition, message.Artist)) { notification.OnTrackRetag(retagMessage); } } }