API Reference
Class
ConsoleWatch
Runs a function again and again and shows its latest result as a live view (the way watch does): the heading counts the runs, changed cells can be highlighted, a failed run shows its error and the watch goes on. On a terminal that is not interactive (redirected output, CI) every run is printed instead. Watch-Console is the PowerShell face.
Inheritance
- Object
- ConsoleWatch
Methods
public static Int32 Run(Func<Int32, IWidget> produce, WatchOptions? options = null, CancellationToken cancellationToken = default) #Returns:
Int32Watches until cancelled or WatchOptions.Count runs have finished.
Parameters
- produce System.Func<System.Int32, ConsoleMonster.Layout.IWidget>
- Builds the view of one run, given its number (1 for the first). It runs on the calling thread.
- options ConsoleMonster.Live.WatchOptions? = null
- Options, or null for the defaults.
- cancellationToken System.Threading.CancellationToken = default
- Ends the watch; the final frame stays.
Returns
The number of runs.
Inherited Methods
public virtual Boolean Equals(Object? obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object?