public virtual bool ContentEquals(LyricsForSongContract contract) { if (contract == null) { return(false); } return(Language == contract.Language && Source == contract.Source && Value == contract.Value); }
public LyricsForSongModel(LyricsForSongContract contract) : this() { ParamIs.NotNull(() => contract); Id = contract.Id; Language = contract.Language; Source = contract.Source; Value = contract.Value; }
public virtual bool ContentEquals(LyricsForSongContract contract) { if (contract == null) { return(false); } return(TranslationType == contract.TranslationType && CultureCode.CultureCode == contract.CultureCode && Source == contract.Source && URL == contract.URL && Value == contract.Value); }
public SongDetailsAjax(SongDetails model, LyricsForSongContract preferredLyrics, int version) { Id = model.Id; UserRating = model.UserRating; LatestComments = model.LatestComments; OriginalVersion = model.OriginalVersion; PersonalDescriptionAuthor = model.PersonalDescriptionAuthor; PersonalDescriptionText = model.PersonalDescriptionText; Version = version; SelectedLyricsId = preferredLyrics != null ? preferredLyrics.Id : 0; SelectedPvId = model.PrimaryPV != null ? model.PrimaryPV.Id : 0; SongType = model.SongType; TagUsages = model.Tags; LinkedPages = model.WebLinks.Select(w => w.Url).Where(RelatedSitesHelper.IsRelatedSite).ToArray(); }
public SongDetailsAjax(SongDetails model, LyricsForSongContract preferredLyrics, int version) { Id = model.Id; UserRating = model.UserRating; LatestComments = model.LatestComments; OriginalVersion = model.OriginalVersion; Version = version; SelectedLyricsId = preferredLyrics != null ? preferredLyrics.Id : 0; SelectedPvId = model.PrimaryPV != null ? model.PrimaryPV.Id : 0; SongType = model.SongType; TagUsages = model.Tags; var domains = new[] { "http://vocadb.net/", "http://utaitedb.net/" }; LinkedPages = model.WebLinks.Where(w => domains.Any(d => w.Url.StartsWith(d, StringComparison.InvariantCultureIgnoreCase))).Select(w => w.Url).ToArray(); }
public virtual LyricsForSong CreateLyrics(LyricsForSongContract lyrics) { ParamIs.NotNull(() => lyrics); return(CreateLyrics(lyrics.Value, lyrics.Source, lyrics.URL, lyrics.TranslationType, lyrics.CultureCode)); }
public PartialViewResult CreateLyrics() { var entry = new LyricsForSongContract(); return(PartialView("LyricsForSongEditRow", new LyricsForSongModel(entry))); }
public LyricsInfoViewModel(LyricsForSongContract lyrics) { Lyrics = lyrics; }