C# Класс HFMCmd.OutputHelper

Helper class providing convenience methods that can be used with any IOutput implementations to ease output of common cases, such as: - a blank line - a single line with no field information - a single record with a single field - a line per object in an IEnumerable
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
LINEBREAKS char[]
WHITESPACE char[]
WORDBREAKS char[]
_log log4net.ILog

Открытые методы

Метод Описание
End ( this output ) : void

Convenience for the common case of not suppressing footer record

GetFieldNamesAndWidths ( object fields, int &widths ) : string[]

Converts the object[] passed to SetHeader into field names and widths. The field names are returned as a string[], while the field widths are returned in an out int[].

InitProgress ( this output, string operation ) : void

Helper method for initiating an operation whose progress will be monitored. Provides defaults for iteration (1) and total (100).

InitProgress ( this output, string operation, int iterations ) : void

Helper method for initiating an operation whose progress will be monitored. Provides default for total (100).

ShouldCancel ( ) : bool

Method that can be used by IOutput implementations to determine the appropriate value to send for the cancel return value in a call to SetProgress.

WrapText ( object value, int width ) : List

Method for wrapping text to a certain width.

WriteEnumerable ( this output, IEnumerable enumerable ) : void

Eases use of the IOutput interface for cases where we want to output a collection of records with a single column.

WriteLine ( this output ) : void

Eases use of the IOutput interface for cases where we just want to output a blank line.

WriteSingleRecord ( this output ) : void

Eases use of the IOutput interface for cases where we just want to output a single record with multiple fields.

WriteSingleValue ( this output, object value ) : void

Eases use of the IOutput interface for cases where we just want to output a single record with a single field.

Описание методов

End() публичный статический Метод

Convenience for the common case of not suppressing footer record
public static End ( this output ) : void
output this
Результат void

GetFieldNamesAndWidths() публичный статический Метод

Converts the object[] passed to SetHeader into field names and widths. The field names are returned as a string[], while the field widths are returned in an out int[].
public static GetFieldNamesAndWidths ( object fields, int &widths ) : string[]
fields object
widths int
Результат string[]

InitProgress() публичный статический Метод

Helper method for initiating an operation whose progress will be monitored. Provides defaults for iteration (1) and total (100).
public static InitProgress ( this output, string operation ) : void
output this
operation string
Результат void

InitProgress() публичный статический Метод

Helper method for initiating an operation whose progress will be monitored. Provides default for total (100).
public static InitProgress ( this output, string operation, int iterations ) : void
output this
operation string
iterations int
Результат void

ShouldCancel() публичный статический Метод

Method that can be used by IOutput implementations to determine the appropriate value to send for the cancel return value in a call to SetProgress.
public static ShouldCancel ( ) : bool
Результат bool

WrapText() публичный статический Метод

Method for wrapping text to a certain width.
public static WrapText ( object value, int width ) : List
value object
width int
Результат List

WriteEnumerable() публичный статический Метод

Eases use of the IOutput interface for cases where we want to output a collection of records with a single column.
public static WriteEnumerable ( this output, IEnumerable enumerable ) : void
output this
enumerable IEnumerable
Результат void

WriteLine() публичный статический Метод

Eases use of the IOutput interface for cases where we just want to output a blank line.
public static WriteLine ( this output ) : void
output this
Результат void

WriteSingleRecord() публичный статический Метод

Eases use of the IOutput interface for cases where we just want to output a single record with multiple fields.
public static WriteSingleRecord ( this output ) : void
output this
Результат void

WriteSingleValue() публичный статический Метод

Eases use of the IOutput interface for cases where we just want to output a single record with a single field.
public static WriteSingleValue ( this output, object value ) : void
output this
value object
Результат void

Описание свойств

LINEBREAKS публичное статическое свойство

public static char[] LINEBREAKS
Результат char[]

WHITESPACE публичное статическое свойство

public static char[] WHITESPACE
Результат char[]

WORDBREAKS публичное статическое свойство

public static char[] WORDBREAKS
Результат char[]

_log публичное статическое свойство

public static ILog,log4net _log
Результат log4net.ILog