public bool FullyEquals(SongMetadata other) { if (!this.Equals(other)) { return(false); } throw new NotImplementedException(); //todo: compare other fields }
public ExtendedSongMetadata(SongMetadata original) { Track = original.Track; Artist = original.Artist; StationPlayedOn = original.StationPlayedOn; StationLogo = original.StationLogo; IsUnknownMetadata = original.IsUnknownMetadata; RadioProgram = original.RadioProgram; }
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)); }
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); }