Esempio n. 1
0
        public IList <IDomElement <TDependencyObject> > QuerySelectorAllWithSelf(StyleSheet styleSheet, ISelector selector)
        {
            // var selector = cachedSelectorProvider.GetOrAdd(selectors);
            var check = "StyleInfo check".Measure(() =>
            {
                if (StyleInfo.CurrentStyleSheet != styleSheet ||
                    StyleInfo.DoMatchCheck == SelectorType.None)
                {
                    return(new List <IDomElement <TDependencyObject> >());
                }
                return(null);
            });

            if (check != null)
            {
                return(check);
            }

            var res = "ROOT QuerySelectorAll".Measure(() => ChildNodes.QuerySelectorAll(styleSheet, selector));

            "match this".Measure(() =>
            {
                var match = Matches(styleSheet, selector);
                if (match.IsSuccess)
                {
                    res.Add(this);
                }
            });

            return(res);
        }
Esempio n. 2
0
        public IHtmlCollection <IElement> QuerySelectorAll(string selectors)
        {
            if (selectors.Contains("|"))
            {
                selectors = selectors.Replace("|", "\\:");
            }

            return(CreateCollection(ChildNodes.QuerySelectorAll(selectors, Parser)));
        }
Esempio n. 3
0
        public IHtmlCollection <IElement> QuerySelectorAllWithSelf(string selectors)
        {
            var selector = cachedSelectorProvider.GetOrAdd(selectors, parser.ParseSelector);

            var res = ChildNodes.QuerySelectorAll(selector);

            if (this.Matches(selectors))
            {
                res.Add(this);
            }

            return(CreateCollection(res));
        }
Esempio n. 4
0
        public IHtmlCollection <IElement> QuerySelectorAllWithSelf(string selectors)
        {
            if (selectors.Contains("|"))
            {
                selectors = selectors.Replace("|", "\\:");
            }

            var res = ChildNodes.QuerySelectorAll(selectors, Parser);

            if (this.Matches(selectors))
            {
                res.Add(this);
            }

            return(CreateCollection(res));
        }
Esempio n. 5
0
 /// <summary>
 /// Returns a list of the elements within the document (using
 /// depth-first pre-order traversal of the document's nodes) that match
 /// the specified group of selectors.
 /// </summary>
 /// <param name="selectors">
 /// A string containing one or more CSS selectors separated by commas.
 /// </param>
 /// <returns>A collection of HTML elements.</returns>
 public IHtmlCollection <IElement> QuerySelectorAll(String selectors)
 {
     return(ChildNodes.QuerySelectorAll(selectors));
 }
Esempio n. 6
0
        public IHtmlCollection <IElement> QuerySelectorAll(string selectors)
        {
            var selector = cachedSelectorProvider.GetOrAdd(selectors, parser.ParseSelector);

            return(CreateCollection(ChildNodes.QuerySelectorAll(selector)));
        }
Esempio n. 7
0
 public IHtmlCollection <IElement> QuerySelectorAll(String selectors) => ChildNodes.QuerySelectorAll(selectors, null);
Esempio n. 8
0
        public IList <IDomElement <TDependencyObject> > QuerySelectorAll(StyleSheet styleSheet, ISelector selector)
        {
            // var selector = cachedSelectorProvider.GetOrAdd(selectors);

            return(ChildNodes.QuerySelectorAll(styleSheet, selector));
        }