Joutsen v0.5.0+12-g5dd5f7e
Public Member Functions | Protected Member Functions | List of all members
Joutsen.ConsoleProgressListPainter Class Reference

A class that writes progress as a list separated by three dots to the console. More...

Public Member Functions

 ConsoleProgressListPainter ()
 Creates anew instance. More...
 
override void ProgressUpdate (double completed, double total, double progress)
 Writes the updated progress to the console. More...
 
override void Clear ()
 Resets the painter in order to restart updates to the console. More...
 
- Public Member Functions inherited from Joutsen.ConsoleProgressPainter
 ConsoleProgressPainter (ushort maxWritesPerSecond=5)
 Creates a new instance with a certain maximum of console updates a second. More...
 
virtual void ProgressUpdate (double completed, double total, double progress)
 Writes the updated progress to the console. More...
 
virtual void DescriptionUpdate (String description)
 Writes the updated description to the console. More...
 
void Paint ()
 Updates the console output. More...
 
virtual void Clear ()
 Resets the painter in order to restart updates to the console. More...
 

Protected Member Functions

override void Paint (double completed, double total, double progress, string description)
 In a derived class handles the actual writing to the console. More...
 
abstract void Paint (double completed, double total, double progress, string description)
 In a derived class handles the actual writing to the console. More...
 

Additional Inherited Members

- Protected Attributes inherited from Joutsen.ConsoleProgressPainter
String description
 The description to write. More...
 
double progress
 The progress value to write. More...
 
double completed
 
double total
 

Detailed Description

A class that writes progress as a list separated by three dots to the console.

Since
0.4.1

Constructor & Destructor Documentation

◆ ConsoleProgressListPainter()

Joutsen.ConsoleProgressListPainter.ConsoleProgressListPainter ( )

Creates anew instance.

Member Function Documentation

◆ Clear()

override void Joutsen.ConsoleProgressListPainter.Clear ( )
virtual

Resets the painter in order to restart updates to the console.

Reimplemented from Joutsen.ConsoleProgressPainter.

◆ Paint()

override void Joutsen.ConsoleProgressListPainter.Paint ( double  completed,
double  total,
double  progress,
string  description 
)
protectedvirtual

In a derived class handles the actual writing to the console.

Implements Joutsen.ConsoleProgressPainter.

◆ ProgressUpdate()

override void Joutsen.ConsoleProgressListPainter.ProgressUpdate ( double  completed,
double  total,
double  progress 
)
virtual

Writes the updated progress to the console.

Remarks
this method is usually used as an event handler for the ProgressChanged event of the progress class. It will only write an new value to the list if the progress has changed.

Reimplemented from Joutsen.ConsoleProgressPainter.