PeanutButter
Loading...
Searching...
No Matches
PeanutButter.Utils.SuppressedTextStatusSteps Class Reference

Provide a mechanism to swap out noisy steps for fully-suppressed ones, esp from testing. More...

Inheritance diagram for PeanutButter.Utils.SuppressedTextStatusSteps:
PeanutButter.Utils.TextStatusSteps PeanutButter.Utils.ITextStatusSteps

Public Member Functions

 SuppressedTextStatusSteps ()
 Create the suppressed status steps - ie to easily conditionally suppress all step output, swap in this one.
Public Member Functions inherited from PeanutButter.Utils.TextStatusSteps
 TextStatusSteps ()
 Create the default status steps with no per-activity prefix and the pass/fail indicators [ OK ] and [FAIL].
 TextStatusSteps (string prefixAllStatusLines, string startMarker, string completedMarker, string failedMarker)
 Create the status steps with:
 TextStatusSteps (string prefixAllStatusLines, string startMarker, string completedMarker, string failedMarker, Action< string > writer)
 Create the status steps with:
 TextStatusSteps (string prefixAllStatusLines, string startMarker, string completedMarker, string failedMarker, Action< string > writer, Action flushAction)
 Create the status steps with:
 TextStatusSteps (string prefixAllStatusLines, string startMarker, string completedMarker, string failedMarker, Action< string > writer, Action flushAction, Func< Exception, ErrorHandlerResult > exceptionHandler)
 Create the status steps with:
 TextStatusSteps (Func< string > prefixAllStatusLines, string startMarker, string completedMarker, string failedMarker, Action< string > writer, Action flushAction, Func< Exception, ErrorHandlerResult > exceptionHandler)
 Create the status steps with:
 TextStatusSteps (Func< string > prefixAllStatusLines, string startMarker, string completedMarker, string failedMarker, Func< string, Task > asyncWriter, Func< Task > asyncFlushAction, Func< Exception, Task< ErrorHandlerResult > > asyncExceptionHandler)
 Create the status steps with:
void Run (string label, Action activity)
 Run the provided activity with the given label.
Parameters
label
activity

async Task RunAsync (string label, Func< Task > activity)
 Run the provided async activity with the given label.
Parameters
label
activity

void Log (string str)
 Simply log within the context of the steps (ie with the same io & prefixing)
Parameters
str

async Task LogAsync (string str)
 Simply log within the context of the steps (ie with the same io & prefixing)
Parameters
str

Additional Inherited Members

Static Public Attributes inherited from PeanutButter.Utils.TextStatusSteps
const string DEFAULT_OK_LABEL = "[ OK ]"
 The default label applied to activities that complete successfully eg "[ OK ] Fetching the stuff".
const string DEFAULT_FAIL_LABEL = "[FAIL]"
 The default label applied to activities that fail eg "[FAIL] Fetching the stuff".
const string DEFAULT_START_LABEL = "[ -- ]"
 The default label applied when starting your activity eg "[ – ] Fetching the stuff.

Detailed Description

Provide a mechanism to swap out noisy steps for fully-suppressed ones, esp from testing.


The documentation for this class was generated from the following file:
  • source/Utils/PeanutButter.Utils/SuppressedTextStatusSteps.cs