Exemple #1
0
        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;
        }
Exemple #4
0
		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;

		}
Exemple #5
0
        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);
        }
Exemple #6
0
 public SongInListForApiContract(SongInList songInList, ContentLanguagePreference languagePreference, SongOptionalFields fields)
 {
     Notes = songInList.Notes;
     Order = songInList.Order;
     Song  = new SongForApiContract(songInList.Song, null, languagePreference, fields);
 }