Exemplo n.º 1
0
        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));
            }
        }
Exemplo n.º 2
0
 public void Add(AdaptiveSubgroup element)
 {
     Subgroups.Add(element);
     element.Parent = this;
 }