|
PeanutButter
|
Provides an easy mechanism for steps of a process with status feedback, ie "starting X..." / {does X} / {"completed" / "failed"}. More...
Public Member Functions | |||||
| 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.
| |||||
| async Task | RunAsync (string label, Func< Task > activity) | ||||
Run the provided async activity with the given label.
| |||||
| void | Log (string str) | ||||
Simply log within the context of the steps (ie with the same io & prefixing)
| |||||
| async Task | LogAsync (string str) | ||||
Simply log within the context of the steps (ie with the same io & prefixing)
| |||||
Provides an easy mechanism for steps of a process with status feedback, ie "starting X..." / {does X} / {"completed" / "failed"}.
| PeanutButter.Utils.TextStatusSteps.TextStatusSteps | ( | string | prefixAllStatusLines, |
| string | startMarker, | ||
| string | completedMarker, | ||
| string | failedMarker ) |
Create the status steps with:
| prefixAllStatusLines | |
| startMarker | |
| completedMarker | |
| failedMarker |
| PeanutButter.Utils.TextStatusSteps.TextStatusSteps | ( | string | prefixAllStatusLines, |
| string | startMarker, | ||
| string | completedMarker, | ||
| string | failedMarker, | ||
| Action< string > | writer ) |
Create the status steps with:
| prefixAllStatusLines | |
| startMarker | |
| completedMarker | |
| failedMarker | |
| writer |
| PeanutButter.Utils.TextStatusSteps.TextStatusSteps | ( | string | prefixAllStatusLines, |
| string | startMarker, | ||
| string | completedMarker, | ||
| string | failedMarker, | ||
| Action< string > | writer, | ||
| Action | flushAction ) |
Create the status steps with:
| prefixAllStatusLines | |
| startMarker | |
| completedMarker | |
| failedMarker | |
| writer | |
| flushAction |
| PeanutButter.Utils.TextStatusSteps.TextStatusSteps | ( | string | prefixAllStatusLines, |
| string | startMarker, | ||
| string | completedMarker, | ||
| string | failedMarker, | ||
| Action< string > | writer, | ||
| Action | flushAction, | ||
| Func< Exception, ErrorHandlerResult > | exceptionHandler ) |
Create the status steps with:
| prefixAllStatusLines | Prefix all status lines with this (after the start/ok/fail marker) |
| startMarker | Marker/placeholder when activity starts |
| completedMarker | Marker for a completed activity |
| failedMarker | Marker for a failed activity |
| writer | Action to call to write a message |
| flushAction | Action to call to flush any buffered messages |
| exceptionHandler | (optional) - if provided, if an error is thrown by the activity, this is invoked. If this returns true, the exception will be rethrown, otherwise it will be suppressed |
| PeanutButter.Utils.TextStatusSteps.TextStatusSteps | ( | Func< string > | prefixAllStatusLines, |
| string | startMarker, | ||
| string | completedMarker, | ||
| string | failedMarker, | ||
| Action< string > | writer, | ||
| Action | flushAction, | ||
| Func< Exception, ErrorHandlerResult > | exceptionHandler ) |
Create the status steps with:
| prefixAllStatusLines | Prefix all status lines with this (after the start/ok/fail marker) |
| startMarker | Marker/placeholder when activity starts |
| completedMarker | Marker for a completed activity |
| failedMarker | Marker for a failed activity |
| writer | Action to call to write a message |
| flushAction | Action to call to flush any buffered messages |
| exceptionHandler | (optional) - if provided, if an error is thrown by the activity, this is invoked. If this returns true, the exception will be rethrown, otherwise it will be suppressed |
| PeanutButter.Utils.TextStatusSteps.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:
| prefixAllStatusLines | Prefix all status lines with this (after the start/ok/fail marker) |
| startMarker | Marker/placeholder when activity starts |
| completedMarker | Marker for a completed activity |
| failedMarker | Marker for a failed activity |
| asyncWriter | Action to call to write a message |
| asyncFlushAction | Action to call to flush any buffered messages |
| asyncExceptionHandler | (optional) - if provided, if an error is thrown by the activity, this is invoked. If this returns true, the exception will be rethrown, otherwise it will be suppressed |
| void PeanutButter.Utils.TextStatusSteps.Log | ( | string | str | ) |
Simply log within the context of the steps (ie with the same io & prefixing)
| str |
Implements PeanutButter.Utils.ITextStatusSteps.
| async Task PeanutButter.Utils.TextStatusSteps.LogAsync | ( | string | str | ) |
Simply log within the context of the steps (ie with the same io & prefixing)
| str |
Implements PeanutButter.Utils.ITextStatusSteps.
| void PeanutButter.Utils.TextStatusSteps.Run | ( | string | label, |
| Action | activity ) |
Run the provided activity with the given label.
| label | |
| activity |
Implements PeanutButter.Utils.ITextStatusSteps.
| async Task PeanutButter.Utils.TextStatusSteps.RunAsync | ( | string | label, |
| Func< Task > | activity ) |
Run the provided async activity with the given label.
| label | |
| activity |
Implements PeanutButter.Utils.ITextStatusSteps.