public bool addReviewer(Review r) { try { reviews.Add(r); } catch { return false; } return true; }
public void removeReview(Review reviewHighlight) { this.reviews.Remove(reviewHighlight); }
public void addReview(Review r) { reviews.Add(r); }
private Album albumParser(XmlNodeReader reader) { string name = reader.GetAttribute("name"); Album a = new Album(name); while (reader.Read()) { if (reader.NodeType == XmlNodeType.Element) { if (reader.Name == "song") { Song s = new Song(); reader.Read(); reader.Read(); s.setName(reader.Value); reader.Read(); reader.Read(); reader.Read(); s.setLength(reader.Value); a.addSong(s); } if (reader.Name == "reviewer") { Review r = new Review(reader.GetAttribute("ref")); reader.Read(); r.setReview(reader.Value); a.addReview(r); } } else if (reader.NodeType == XmlNodeType.EndElement) if (reader.Name == "album") break; } return a; }