Table of Contents

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

text string

HTML content to format.

tidyConfigPath string

Path to the tidy configuration file.

powershellRunnerInvoke Func<List<string>, Task<List<List<string>>>>

Function to invoke PowerShell commands.

Returns

Task<string>

Formatted HTML content.

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

mapDirectory string

Directory for the map file.

fileExtension string

File extension for the map file.

Returns

Tuple<FileInfo, string>

Tuple of FileInfo and unique map name.

WriteToFile(Tuple<FileInfo, string>, string)

Writes input text to a memory-mapped file.

public static void WriteToFile(Tuple<FileInfo, string> mapInfo, string text)

Parameters

mapInfo Tuple<FileInfo, string>

Map info tuple containing file info and map name.

text string

Text to write.