C# Class IrcShark.Extensions.Terminal.ConsoleTable

Handles building of Console Tables.
Afficher le fichier Open project: hapm/IrcShark Class Usage Examples

Méthodes publiques

Méthode Description
AppendRow ( IList rowData ) : void

Adds a row of data to the table.

ConsoleTable ( ) : System

Initializes a new instance of the ConsoleTable class.

InsertRow ( IList rowData ) : void

Inser the given row data at the beginning of the table. Much the same as PrependRow().

InsertRow ( IList rowData, int rowIndex ) : void

Insert the given row data at the given row index.

PrependRow ( IList rowData ) : void

Prepends a row of data to the table.

SetFooters ( IList footers ) : void

Adds footers to the table.

SetHeaders ( IList headers ) : void

Adds headers to the table.

ToString ( ) : string

Private Methods

Méthode Description
BuildTable ( ) : string

Creates the table

CalculateCellLengths ( ArrayList rowData ) : void

Calculates the maximum cell length for each column and stores it in the cellLengths array.

GetFooterLine ( ) : string

Returns a string composed of the footers for the table

GetHeaderLine ( ) : string

Returns a string composed of the headers for the table

GetSeparator ( ) : string

Returns a string composed of a separator line

UpdateRowsCols ( ArrayList rowData ) : void

Updates maxrows and maxcols values

ValidateTable ( ) : void

Method Details

AppendRow() public méthode

Adds a row of data to the table.
public AppendRow ( IList rowData ) : void
rowData IList An IList of the row data.
Résultat void

ConsoleTable() public méthode

Initializes a new instance of the ConsoleTable class.
public ConsoleTable ( ) : System
Résultat System

InsertRow() public méthode

Inser the given row data at the beginning of the table. Much the same as PrependRow().
public InsertRow ( IList rowData ) : void
rowData IList An IList of the row data.
Résultat void

InsertRow() public méthode

Insert the given row data at the given row index.
public InsertRow ( IList rowData, int rowIndex ) : void
rowData IList An IList of the row data.
rowIndex int Row index to insert at.
Résultat void

PrependRow() public méthode

Prepends a row of data to the table.
public PrependRow ( IList rowData ) : void
rowData IList An IList of the row data.
Résultat void

SetFooters() public méthode

Adds footers to the table.
public SetFooters ( IList footers ) : void
footers IList An IList collection of the headers.
Résultat void

SetHeaders() public méthode

Adds headers to the table.
public SetHeaders ( IList headers ) : void
headers IList An IList collection of the headers.
Résultat void

ToString() public méthode

public ToString ( ) : string
Résultat string