Table of Contents

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

dictionary Dictionary<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

dictionary Dictionary<TKey, IList<TValue>>

The dictionary to process.

percentCalculatorFactory IPercentCalculatorTog

Factory for creating percent calculators.

Returns

string

Formatted text with percentage distribution.

Type Parameters

TKey

The type of the key.

TValue

The 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

dictionary Dictionary<TKey, List<TValue>>

The dictionary to process.

Returns

string

Formatted text with percentage distribution.

Type Parameters

TKey

The type of the key.

TValue

The type of the list elements.