public void AddCommentary(Commentary commentary) { if (HasCommentary(commentary)) { throw new InvalidEncounterDataException("Commentary already exists in this match"); } commentaries.Add(commentary); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (!(obj is Commentary)) { return(false); } Commentary commentaryCompared = (Commentary)obj; return(Id == commentaryCompared.Id); }
public void RemoveCommentary(Commentary commentary) { commentaries.Remove(commentary); }
public bool HasCommentary(Commentary commentary) { return(commentaries.Contains(commentary)); }