/// <summary> Method adds another aggregation as a parent to this </summary> /// <param name = "Parent_Aggregation">New parent aggregation</param> public void Add_Parent_Aggregation(Item_Aggregation_Related_Aggregations Parent_Aggregation) { // If the list is currently null, create it if (Parents == null) { Parents = new List <Item_Aggregation_Related_Aggregations> { Parent_Aggregation }; } else { // If this does not exist, add it if (!Parents.Contains(Parent_Aggregation)) { Parents.Add(Parent_Aggregation); } } }
/// <summary> Method adds another aggregation as a child of this </summary> /// <param name = "Child_Aggregation">New child aggregation</param> public void Add_Child_Aggregation(Item_Aggregation_Related_Aggregations Child_Aggregation) { // If the list is currently null, create it if (Children == null) { Children = new List <Item_Aggregation_Related_Aggregations> { Child_Aggregation }; } else { // If this does not exist, add it if (!Children.Contains(Child_Aggregation)) { Children.Add(Child_Aggregation); } } }