Exemplo n.º 1
0
        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.OnBookRetagEnabled())
            {
                if (ShouldHandleArtist(notification.Definition, message.Author))
                {
                    notification.OnBookRetag(retagMessage);
                }
            }
        }