Exemplo n.º 1
0
 public void AddCommentary(Commentary commentary)
 {
     if (HasCommentary(commentary))
     {
         throw new InvalidEncounterDataException("Commentary already exists in this match");
     }
     commentaries.Add(commentary);
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public void RemoveCommentary(Commentary commentary)
 {
     commentaries.Remove(commentary);
 }
Exemplo n.º 4
0
 public bool HasCommentary(Commentary commentary)
 {
     return(commentaries.Contains(commentary));
 }