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
파일 보기 프로젝트 열기: agardiner/hfmcmd

공개 프로퍼티들

프로퍼티 타입 설명
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