BetterCMS.Module.LuceneSearch.Services.IndexerService.DefaultIndexerService.CollectChildrenNodesInnerHtml C# (CSharp) Метод

CollectChildrenNodesInnerHtml() приватный статический Метод

private static CollectChildrenNodesInnerHtml ( HtmlAgilityPack.HtmlNodeCollection nodesCollection, StringBuilder contentText ) : void
nodesCollection HtmlAgilityPack.HtmlNodeCollection
contentText StringBuilder
Результат void
        private static void CollectChildrenNodesInnerHtml(HtmlNodeCollection nodesCollection, StringBuilder contentText)
        {
            foreach (var childNode in nodesCollection)
            {
                if (CanIncludeNodeToResults(childNode))
                {
                    if (childNode.ChildNodes != null && childNode.ChildNodes.Count > 0)
                    {
                        CollectChildrenNodesInnerHtml(childNode.ChildNodes, contentText);
                    }
                    else
                    {
                        if (!string.IsNullOrEmpty(childNode.InnerText))
                        {
                            contentText.Append(childNode.InnerText);
                        }
                    }
                }
            }
        }