protected void HandleChild(ParseResult result, XElement child, string baseUri, bool addImageQuery) { if (child.IsType("subgroup")) { AdaptiveSubgroup subgroup = new AdaptiveSubgroup(Context, SupportedFeatures); subgroup.Parse(result, child, baseUri, addImageQuery); if (!result.IsOkForRender()) { throw new IncompleteElementException(); } if (subgroup != null) { this.Add(subgroup); } } else { result.AddError($@"Invalid child ""{child.Name.LocalName}"" found in a group. Groups can only contain subgroups.", GetErrorPositionInfo(child)); } }
public void Add(AdaptiveSubgroup element) { Subgroups.Add(element); element.Parent = this; }