ApiDocs.Publishing.Html.HtmlMustacheWriter.SortTocTree(System.Collections.Generic.List)

Here are the examples of the csharp api class ApiDocs.Publishing.Html.HtmlMustacheWriter.SortTocTree(System.Collections.Generic.List) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

1. Example

Project: markdown-scanner
Source File: HtmlMustacheWriter.cs
private List<TocItem> SortTocTree(List<TocItem> tree)
        {
            if (tree == null)
                return null;
            if (tree.Count == 0)
                return tree;

            foreach (var item in tree)
            {
                item.NextLevel = SortTocTree(item.NextLevel);
            }

            var sorted = from item in tree
                         orderby item.SortOrder, item.Title
                         select item;

            return sorted.ToList();
        }

2. Example

Project: markdown-scanner
Source File: HtmlMustacheWriter.cs
private List<TocItem> BuildTreeFromList(List<TocItem> headers, DocFile currentPage = nul/n ..... /n //View Source file for more details /n }