Class TextGenerator
- Namespace
- SunamoTextOutputGenerator
- Assembly
- SunamoTextOutputGenerator.dll
Static text generation utilities. TextWriterList - instance, TextBuilder - instance, TextOutputGenerator - instance, TextGenerator - static.
public static class TextGenerator
- Inheritance
-
TextGenerator
- Inherited Members
Methods
GenerateListWithPercent(Dictionary<string, List<string>>)
Generates a list with percent distribution from a string dictionary. Keep as IList, not List because to IList can be casted every List.
public static string GenerateListWithPercent(Dictionary<string, List<string>> dictionary)
Parameters
dictionaryDictionary<string, List<string>>The dictionary of category names to their string values.
Returns
- string
Formatted text with percentage distribution.
GenerateListWithPercent<TKey, TValue>(Dictionary<TKey, IList<TValue>>, IPercentCalculatorTog)
Generates a list with percent distribution from a generic dictionary with IList values.
public static string GenerateListWithPercent<TKey, TValue>(Dictionary<TKey, IList<TValue>> dictionary, IPercentCalculatorTog percentCalculatorFactory) where TKey : notnull
Parameters
dictionaryDictionary<TKey, IList<TValue>>The dictionary to process.
percentCalculatorFactoryIPercentCalculatorTogFactory for creating percent calculators.
Returns
- string
Formatted text with percentage distribution.
Type Parameters
TKeyThe type of the key.
TValueThe type of the list elements.
GenerateListWithPercent<TKey, TValue>(Dictionary<TKey, List<TValue>>)
Generates a list with percent distribution from a generic dictionary with List values.
public static string GenerateListWithPercent<TKey, TValue>(Dictionary<TKey, List<TValue>> dictionary) where TKey : notnull
Parameters
dictionaryDictionary<TKey, List<TValue>>The dictionary to process.
Returns
- string
Formatted text with percentage distribution.
Type Parameters
TKeyThe type of the key.
TValueThe type of the list elements.