C# Class IrcShark.Extensions.Terminal.ConsoleTable

Handles building of Console Tables.
Exibir arquivo Open project: hapm/IrcShark Class Usage Examples

Public Methods

Method 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

Method 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 method

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

ConsoleTable() public method

Initializes a new instance of the ConsoleTable class.
public ConsoleTable ( ) : System
return System

InsertRow() public method

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.
return void

InsertRow() public method

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.
return void

PrependRow() public method

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

SetFooters() public method

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

SetHeaders() public method

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

ToString() public method

public ToString ( ) : string
return string