Exemplo n.º 1
0
        public override bool IsValid()
        {
            IEnumerable <IHTMLItem> captions = Subitems.FindAll(x => x is FigCaption);

            foreach (var figCaption in captions) // figcaption can be only first or last element
            {
                if (figCaption != Subitems.First() && figCaption != Subitems.Last())
                {
                    return(false);
                }
            }
            return(true);
        }
Exemplo n.º 2
0
        public override bool IsValid()
        {
            IEnumerable <IHTMLItem> captions = Subitems.FindAll(x => x is FigCaption);

            return(captions.All(figCaption => figCaption == Subitems.First() || figCaption == Subitems.Last()));
        }