Exemplo n.º 1
0
 public string ProcessDocument(string document, string fragment)
 {
     if (string.IsNullOrWhiteSpace(document))
     {
         var    userGuideIndex = userGuideDocumentParser.GetDocumentIndex();
         string str            = markdownProcessor.ProcessFragment(string.Join(Environment.NewLine + Environment.NewLine
                                                                               , userGuideIndex.Keys.OrderBy(k => k)));
         return(str);
     }
     else if (string.Compare(document, "userGuide", StringComparison.OrdinalIgnoreCase) != 0)
     {
         return("");
     }
     else
     {
         IDocumentParser parser        = userGuideDocumentParser;
         var             titleMD       = parser.GetFragment("userGuideTitle", fragment);
         var             titleHtml     = titleMD; // markdownProcessor.ProcessFragment(titleMD);
         var             userGuideMD   = parser.GetFragment("userGuide", fragment);
         var             userGuideHtml = markdownProcessor.ProcessFragment(userGuideMD);
         var             wrapper       = htmlWrapper.Replace("{userGuideTitle}", titleHtml).Replace("{userGuide}", userGuideHtml);
         return(wrapper);
     }
 }