/// <summary> Method adds a minimally reported aggregation as a parent of this </summary> /// <param name="Parent_Aggregation">New child aggregation</param> public void Add_Parent_Aggregation(Item_Aggregation_Minimal Parent_Aggregation) { // If the list is currently null, create it if (Parents == null) { Parents = new List <Item_Aggregation_Minimal> { Parent_Aggregation }; } else { // If this does not exist, add it if (!Parents.Contains(Parent_Aggregation)) { Parents.Add(Parent_Aggregation); } } }
/// <summary> Method adds a minimally reported aggregation as a parent of this </summary> /// <param name="ParentCode"> Aggregation code for this minimally reported aggregation </param> /// <param name="ParentName"> Full name for this minimally reported aggregation </param> /// <param name="ParentShortName"> Shortened name for this minimally reported aggregation </param> public void Add_Parent_Aggregation(string ParentCode, string ParentName, string ParentShortName) { // Create the object Item_Aggregation_Minimal parentAggregation = new Item_Aggregation_Minimal(ParentCode, ParentName, ParentShortName); // If the list is currently null, create it if (Parents == null) { Parents = new List <Item_Aggregation_Minimal> { parentAggregation }; } else { // If this does not exist, add it if (!Parents.Contains(parentAggregation)) { Parents.Add(parentAggregation); } } }