Table of Contents

Class TextOutputGeneratorStatic

Namespace
SunamoTextOutputGenerator
Assembly
SunamoTextOutputGenerator.dll

Static helper methods for generating text output from collections and dictionaries.

public class TextOutputGeneratorStatic
Inheritance
TextOutputGeneratorStatic
Inherited Members
Extension Methods

Methods

CompareList(List<string>, string, List<string>, string, List<string>)

Compares two lists and outputs them with headers showing which items are in both, first only, or second only.

public static string CompareList(List<string> both, string firstHeader, List<string> firstList, string secondHeader, List<string> secondList)

Parameters

both List<string>

Items present in both lists.

firstHeader string

Header for the first list.

firstList List<string>

The first list of items.

secondHeader string

Header for the second list.

secondList List<string>

The second list of items.

Returns

string

Formatted text output comparing the lists.

Dictionary(Dictionary<string, string>)

Outputs a string-string dictionary as formatted text.

public static string Dictionary(Dictionary<string, string> dictionary)

Parameters

dictionary Dictionary<string, string>

The dictionary to output.

Returns

string

Formatted text output of the dictionary.

DictionaryWithCount<TKey, TValue>(Dictionary<TKey, List<TValue>>)

Outputs a dictionary with list values, showing each list under its key as header.

public static string DictionaryWithCount<TKey, TValue>(Dictionary<TKey, List<TValue>> dictionary) where TKey : notnull

Parameters

dictionary Dictionary<TKey, List<TValue>>

The dictionary to output.

Returns

string

Formatted text output of the dictionary with counts.

Type Parameters

TKey

The type of the key.

TValue

The type of the list elements.