Example #1
0
 public DocsMarkdownRenderingContext(
     Site site,
     Section section,
     DocsSiteRouter router)
 {
     Site    = site;
     Section = section;
     Router  = router;
 }
Example #2
0
        public NavigationBuilderFacts()
        {
            var source = Substitute.For <IContentSource>();

            source.Version.Returns("TEST");
            source.Path.Returns(new Path(""));

            var section = new Section(new ContentItem(
                                          source, null, null),
                                      new SectionDefinition()
            {
                Id = "sectionId"
            }, new Dictionary <Path, ContentItem>()
            {
                ["1-example.md"]            = new ContentItem(source, null, null),
                ["1-Subsection/1-first.md"] = new ContentItem(source, null, null),
                ["1-Subsection/SubSubSection/1-first.md"]  = new ContentItem(source, null, null),
                ["1-Subsection/SubSubSection/1-second.md"] = new ContentItem(source, null, null),
                ["1-Subsection/1-second.md"] = new ContentItem(source, null, null)
            });

            var site = new Site(
                new SiteDefinition(),
                new Dictionary <string, Dictionary <string, Section> >()
            {
                ["TEST"] = new Dictionary <string, Section>()
                {
                    [section.Id] = section
                }
            });

            _router    = new DocsSiteRouter(site, section);
            _mdService = new DocsMarkdownService(
                new DocsMarkdownRenderingContext(site, section, _router));

            _sut = new NavigationBuilder(_mdService, null);
        }
 public NavigationBuilder(DocsMarkdownService markdownService, DocsSiteRouter router)
 {
     _markdownService = markdownService;
 }
 public HtmlDisplayLinksRenderer(DocsMarkdownRenderingContext context)
 {
     _router = context.Router;
 }
 public DisplayLinkInlineParser(DocsMarkdownRenderingContext context)
 {
     _router           = context.Router;
     OpeningCharacters = "[".ToCharArray();
 }