public void AddRelatedCulture(Culture other) { if (RelationChild.Contains(other)) { return; } RelationChild.Add(other); RelationParent.Add(other); other.AddRelatedCulture(this); }
/// <summary> /// Helper function for adding skill relations. /// Adds to both this skill and to <paramref name="relation"/>. /// </summary> /// <param name="relation">The skill this skill is related to.</param> public void AddSkillRelation(Skill relation) { // if already in list, don't add it again. if (RelationChild.Contains(relation)) { return; } // add to this skill RelationChild.Add(relation); RelationParent.Add(relation); // add to the other skill, if it already exists in relation it // will not be added again. relation.AddSkillRelation(this); }