Table of Contents

Class CsvOutputKit

Namespace
Hi.Common.CsvUtils
Assembly
HiGeom.dll

CSV output toolkit. Toolkit for getting Comma-seperated Csv lines.

public class CsvOutputKit
Inheritance
CsvOutputKit
Inherited Members
Extension Methods

Constructors

CsvOutputKit(List<string>)

Ctor.

public CsvOutputKit(List<string> prefixTitleList = null)

Parameters

prefixTitleList List<string>

Custom title order at the leading columns. If no custom order needed, keep the parameter null.

Methods

BuildCsvTitleByCsvRow(IGetCsvDictionary)

Builds the CSV title structure based on the keys in the dictionary provided by an IGetCsvDictionary object.

public void BuildCsvTitleByCsvRow(IGetCsvDictionary row)

Parameters

row IGetCsvDictionary

An object implementing IGetCsvDictionary interface.

BuildCsvTitleByCsvRow(Dictionary<string, string>)

Builds the CSV title structure based on the keys in the provided dictionary.

public void BuildCsvTitleByCsvRow(Dictionary<string, string> row)

Parameters

row Dictionary<string, string>

Dictionary containing key-value pairs to be used for building the CSV title.

GetCsvRowText(IGetCsvDictionary)

Converts an object implementing IGetCsvDictionary to a CSV row text.

public string GetCsvRowText(IGetCsvDictionary row)

Parameters

row IGetCsvDictionary

An object implementing IGetCsvDictionary interface.

Returns

string

A comma-separated string representing the row, or null if the input is null.

GetCsvRowText(Dictionary<string, object>)

Converts a dictionary of string keys and object values to a CSV row text.

public string GetCsvRowText(Dictionary<string, object> row)

Parameters

row Dictionary<string, object>

Dictionary containing key-value pairs to be converted to CSV format.

Returns

string

A comma-separated string representing the row, or null if the input is null.

GetCsvRowText(Dictionary<string, string>)

Converts a dictionary of string keys and values to a CSV row text.

public string GetCsvRowText(Dictionary<string, string> row)

Parameters

row Dictionary<string, string>

Dictionary containing key-value pairs to be converted to CSV format.

Returns

string

A comma-separated string representing the row, or null if the input is null.

GetCsvTitle()

The title is obtained by the previous added csv row.

public string GetCsvTitle()

Returns

string