/// <summary> /// Exports help file into current state project folder /// </summary> /// <param name="filename">help.txt</param> /// <param name="open">true</param> /// <param name="onlyThisConsole">if set to <c>true</c> [only this console].</param> /// <remarks> /// Writes a txt file with content equal to the result of help command /// </remarks> /// <seealso cref="aceOperationSetExecutorBase" /> public void aceOperation_helpExportHelp( [Description("help.txt")] String filename = "help.txt", [Description("true")] Boolean open = true, [Description("If true it will generate user manual only for this console")] Boolean onlyThisConsole = false) { builderForMarkdown mdBuilder = new builderForMarkdown(); if (onlyThisConsole) { var cst = commandTreeTools.BuildCommandTree(this, false); cst.ReportCommandTree(mdBuilder, false, 0, aceCommandConsoleHelpOptions.full); helpContent = mdBuilder.getLastLine(); } else { commandSetTree.ReportCommandTree(mdBuilder, false, 0, aceCommandConsoleHelpOptions.full); helpContent = mdBuilder.GetContent(); } String p = workspace.folder.pathFor(filename); if (p.saveToFile(helpContent)) { response.log("Help file saved to: " + p); } if (open) { externalTool.notepadpp.run(p); } }
public void SaveReport(String filepath) { builderForMarkdown textRender = new builderForMarkdown(); Report(textRender); File.WriteAllText(filepath, textRender.GetContent()); }