Class TidyExeHelper
- Namespace
- SunamoWinStd
- Assembly
- SunamoWinStd.dll
Helper for formatting HTML using the tidy executable via memory-mapped files.
public class TidyExeHelper
- Inheritance
-
TidyExeHelper
- Inherited Members
- Extension Methods
Methods
FormatHtml(string, string, Func<List<string>, Task<List<List<string>>>>)
Formats HTML content using the tidy executable via PowerShell.
public static Task<string> FormatHtml(string text, string tidyConfigPath, Func<List<string>, Task<List<List<string>>>> powershellRunnerInvoke)
Parameters
textstringHTML content to format.
tidyConfigPathstringPath to the tidy configuration file.
powershellRunnerInvokeFunc<List<string>, Task<List<List<string>>>>Function to invoke PowerShell commands.
Returns
GenerateMapInfo(string, string)
Generates a unique map info tuple with file info and map name.
public static Tuple<FileInfo, string> GenerateMapInfo(string mapDirectory, string fileExtension)
Parameters
mapDirectorystringDirectory for the map file.
fileExtensionstringFile extension for the map file.
Returns
WriteToFile(Tuple<FileInfo, string>, string)
Writes input text to a memory-mapped file.
public static void WriteToFile(Tuple<FileInfo, string> mapInfo, string text)