Cake.Web.Core.Content.Documentation.TopicReader.FixLinks C# (CSharp) Метод

FixLinks() приватный Метод

private FixLinks ( Cake.Web.Core.Content.Documentation.TopicTree tree ) : Cake.Web.Core.Content.Documentation.TopicTree
tree Cake.Web.Core.Content.Documentation.TopicTree
Результат Cake.Web.Core.Content.Documentation.TopicTree
        private TopicTree FixLinks(TopicTree tree)
        {
            Topic previous = null;
            foreach (var section in tree.Sections)
            {
                section.Tree = tree;
                foreach (var topic in section.Topics)
                {
                    if (topic.HasContent)
                    {
                        if (previous != null)
                        {
                            topic.Previous = previous;
                            previous.Next = topic;
                        }
                        previous = topic;
                    }
                }
            }
            return tree;
        }