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

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

private static GetTitle ( HtmlAgilityPack.HtmlDocument html ) : string
html HtmlAgilityPack.HtmlDocument
Результат string
        private static string GetTitle(HtmlDocument html)
        {
            var titleText = string.Empty;
            var title = html.DocumentNode.SelectSingleNode("//title");

            if (title != null)
            {
                titleText = title.InnerText;
                if (!string.IsNullOrWhiteSpace(titleText))
                {
                    titleText = HttpUtility.HtmlDecode(titleText);
                }
            }

            return titleText;
        }