Ejemplo n.º 1
0
        /// <summary>
        /// Returns the elements within the given elements (using depth-first
        /// pre-order traversal) that match the selectors with the given scope.
        /// </summary>
        /// <param name="selector">A selector object.</param>
        /// <param name="elements">The elements to take as source.</param>
        /// <param name="scope">The element to take as scope.</param>
        /// <returns>The collection containing the resulting elements.</returns>
        public static IHtmlCollection <IElement> MatchAll(this ISelector selector, IEnumerable <IElement> elements, IElement?scope)
        {
            var result = new List <IElement>();

            selector.MatchAll(elements, scope, result);
            return(new HtmlCollection <IElement>(result));
        }