Ejemplo n.º 1
0
        public bool FullyEquals(SongMetadata other)
        {
            if (!this.Equals(other))
            {
                return(false);
            }

            throw new NotImplementedException(); //todo: compare other fields
        }
Ejemplo n.º 2
0
 public ExtendedSongMetadata(SongMetadata original)
 {
     Track             = original.Track;
     Artist            = original.Artist;
     StationPlayedOn   = original.StationPlayedOn;
     StationLogo       = original.StationLogo;
     IsUnknownMetadata = original.IsUnknownMetadata;
     RadioProgram      = original.RadioProgram;
 }
Ejemplo n.º 3
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (!(obj is SongMetadata))
            {
                return(false);
            }

            SongMetadata other = (SongMetadata)obj;

            return(this.Track.Equals(other.Track, StringComparison.CurrentCultureIgnoreCase) && this.Artist.Equals(other.Artist, StringComparison.CurrentCultureIgnoreCase));
        }
Ejemplo n.º 4
0
        internal static SongMetadata Parse(string str)
        {
            if (string.IsNullOrWhiteSpace(str))
            {
                return(null);
            }

            SongMetadata data = new SongMetadata();

            string[] bits = str.Split(new string[] { " - " }, 2, StringSplitOptions.None);

            data.Artist = bits[0].Trim();
            data.Track  = bits[1].Trim();

            return(data);
        }