Ejemplo n.º 1
0
        //Only CLIENT_ID & SONG_ID used to compare because other variables always different and unimportant in our task
        public bool Equals(PlayedSongsModel other)
        {
            if (other == null)
            {
                return(false);
            }

            return(this.CLIENT_ID.Equals(other.CLIENT_ID) && this.SONG_ID.Equals(other.SONG_ID));
        }
Ejemplo n.º 2
0
        //Equals methods are overrided so object contain/compare methods can be used in hashset and other lists
        public override bool Equals(object newplayedSongsModel)
        {
            if (newplayedSongsModel == null)
            {
                return(false);
            }

            PlayedSongsModel playedSongsModel = newplayedSongsModel as PlayedSongsModel;

            if (playedSongsModel == null)
            {
                return(false);
            }
            else
            {
                return(Equals(playedSongsModel));
            }
        }