public void AddChild(HeartbeatInterface Child) { if (Children.Contains(Child)) { throw new ArgumentException("Error trying to add a heartbeat child: this heartbeat-tracker already contains this instance."); } Children.Add(Child); }
public void RemoveChild(HeartbeatInterface Child) { if (!Children.Contains(Child)) { throw new ArgumentException("Error trying to remove a heartbeat child: this heartbeat-tracker does not contain this instance."); } Children.Remove(Child); }
public bool ContainsChild(HeartbeatInterface Child) { return(Children.Contains(Child)); }