public SongInListEditContract(SongInList songInList, ContentLanguagePreference languagePreference) : base(songInList, languagePreference, SongOptionalFields.AdditionalNames) { ParamIs.NotNull(() => songInList); SongInListId = songInList.Id; }
public SongInListContract(SongInList songInList, ContentLanguagePreference languagePreference) { ParamIs.NotNull(() => songInList); Order = songInList.Order; Notes = songInList.Notes; Song = new SongContract(songInList.Song, languagePreference); }
public SongInListEditContract(SongInList songInList, ContentLanguagePreference languagePreference) { ParamIs.NotNull(() => songInList); SongInListId = songInList.Id; Order = songInList.Order; Notes = songInList.Notes; SongName = songInList.Song.TranslatedName[languagePreference]; SongAdditionalNames = string.Join(", ", songInList.Song.AllNames.Where(n => n != SongName)); SongArtistString = songInList.Song.ArtistString[languagePreference]; SongId = songInList.Song.Id; }
public virtual bool Equals(SongInList another) { if (another == null) return false; if (ReferenceEquals(this, another)) return true; if (Id == 0) return false; return this.Id == another.Id; }
public virtual bool Equals(SongInList another) { if (another == null) { return(false); } if (ReferenceEquals(this, another)) { return(true); } if (Id == 0) { return(false); } return(this.Id == another.Id); }
public SongInListForApiContract(SongInList songInList, ContentLanguagePreference languagePreference, SongOptionalFields fields) { Notes = songInList.Notes; Order = songInList.Order; Song = new SongForApiContract(songInList.Song, null, languagePreference, fields); }