public CreateMarkdownService ( |
||
parameters | ||
리턴 | IMarkdownService |
static void Main(string[] args) { DfmJsonTokenTreeServiceProvider dfmJsonTokenTreeServiceProvider = new DfmJsonTokenTreeServiceProvider(); IMarkdownService dfmMarkdownService = dfmJsonTokenTreeServiceProvider.CreateMarkdownService(new MarkdownServiceParameters()); while (true) { try { string command = Console.ReadLine(); switch (command.ToLower().Trim()) { case "exit": return; case "dfmmarkup": DfmMarkupReceiveContent(); break; case "jsonmarkup": JsonMarkupReceiveContent(dfmMarkdownService); break; default: SendWithEndCode("Undefined Command"); continue; } } catch (Exception e) { SendWithEndCode($"error:{e.Message}"); } } }
private void TestDfmJsonTokenTreeJsonRender(string source, string expected) { DfmJsonTokenTreeServiceProvider dfmJsonTokenTreeServiceProvider = new DfmJsonTokenTreeServiceProvider(); IMarkdownService dfmMarkdownService = dfmJsonTokenTreeServiceProvider.CreateMarkdownService(new MarkdownServiceParameters()); var result = dfmMarkdownService.Markup(source, null).Html; Assert.Equal(expected, result); }