Exemple #1
0
        public static void MatchClassName(this HtmlNodeCollection nodes, string className, Action <HtmlNode> some = null, Action none = null)
        {
            var elements = nodes.GetElementsByClassName(className);

            if (elements.Count() != 0 && some != null)
            {
                some(elements.Single());
            }
            else if (none != null)
            {
                none();
            }
        }