C# Class CK.Core.ActivityMonitorTextWriterClient

Formats the activity and pushes piece of texts to an Action{T} where T is a string.
Inheritance: ActivityMonitorTextHelperClient
Show file Open project: Invenietis/ck-core Class Usage Examples

Public Methods

Method Description
ActivityMonitorTextWriterClient ( Action writer ) : System

Initializes a new ActivityMonitorTextWriterClient bound to a function that must write a string.

ActivityMonitorTextWriterClient ( Action writer, LogFilter filter ) : System

Initializes a new ActivityMonitorTextWriterClient bound to a function that must write a string, with a filter.

DumpException ( StringBuilder w, string prefix, bool displayMessage, Exception ex ) : void

Recursively dumps an Exception as readable text.

Protected Methods

Method Description
OnContinueOnSameLevel ( ActivityMonitorLogData data ) : void

Writes all information.

OnEnterLevel ( ActivityMonitorLogData data ) : void

Writes all the information.

OnGroupClose ( IActivityLogGroup g, IReadOnlyList conclusions ) : void

Writes group conclusion and updates internally managed line prefix.

OnGroupOpen ( IActivityLogGroup g ) : void

Writes a group opening.

OnLeaveLevel ( LogLevel level ) : void

Updates the internally maintained prefix for lines.

Method Details

ActivityMonitorTextWriterClient() public method

Initializes a new ActivityMonitorTextWriterClient bound to a function that must write a string.
public ActivityMonitorTextWriterClient ( Action writer ) : System
writer Action Function that writes the content.
return System

ActivityMonitorTextWriterClient() public method

Initializes a new ActivityMonitorTextWriterClient bound to a function that must write a string, with a filter.
public ActivityMonitorTextWriterClient ( Action writer, LogFilter filter ) : System
writer Action Function that writes the content.
filter LogFilter Filter to apply
return System

DumpException() static public method

Recursively dumps an Exception as readable text.
static public DumpException ( StringBuilder w, string prefix, bool displayMessage, Exception ex ) : void
w StringBuilder The TextWriter to write to.
prefix string Prefix that will start all lines.
displayMessage bool Whether the exception message must be displayed or skip.
ex System.Exception The exception to display.
return void

OnContinueOnSameLevel() protected method

Writes all information.
protected OnContinueOnSameLevel ( ActivityMonitorLogData data ) : void
data ActivityMonitorLogData Log data.
return void

OnEnterLevel() protected method

Writes all the information.
protected OnEnterLevel ( ActivityMonitorLogData data ) : void
data ActivityMonitorLogData Log data.
return void

OnGroupClose() protected method

Writes group conclusion and updates internally managed line prefix.
protected OnGroupClose ( IActivityLogGroup g, IReadOnlyList conclusions ) : void
g IActivityLogGroup Group that must be closed.
conclusions IReadOnlyList Conclusions for the group.
return void

OnGroupOpen() protected method

Writes a group opening.
protected OnGroupOpen ( IActivityLogGroup g ) : void
g IActivityLogGroup Group information.
return void

OnLeaveLevel() protected method

Updates the internally maintained prefix for lines.
protected OnLeaveLevel ( LogLevel level ) : void
level LogLevel Previous level.
return void