/// <summary> /// Sets a value read from an object's metadata XML. /// </summary> /// <param name="key"> /// The key of the property read from XML. /// </param> /// <param name="value"> /// The value of the property read from XML. /// </param> protected override void SetValue(string key, string value) { if (key.Is("artist")) { this.Artist = value; } else if (key.Is("album")) { this.Album = value; } else if (key.Is("albumArtURI")) { this.AlbumArtUri = value; } else if (key.Is("contributor")) { this.Contributor = value; } else if (key.Is("date")) { this.Date = ParsingHelper.ParseDate(value); } else if (key.Is("originalTrackNumber")) { this.TrackNumber = int.Parse(value); } else { base.SetValue(key, value); } }
/// <summary> /// Sets a value read from an object's metadata XML. /// </summary> /// <param name="key"> /// The key of the property read from XML. /// </param> /// <param name="value"> /// The value of the property read from XML. /// </param> /// <returns> /// <c>true</c>, if the value was set; otherwise, <c>false</c>. /// </returns> protected override void SetValue(string key, string value) { if (key.Is("StorageMedium")) { this.StorageMedium = value; } else if (key.Is("longDescription")) { this.LongDescription = value; } else if (key.Is("rating")) { this.Rating = value; } else if (key.Is("description")) { this.Description = value; } else if (key.Is("publisher")) { this.Publisher = value; } else if (key.Is("date")) { this.Date = ParsingHelper.ParseDate(value); } else if (key.Is("rights")) { this.Rights = value; } else if (key.Is("albumArtURI")) { this.AlbumArtURI = value; } else { base.SetValue(key, value); } }