Class
ConsoleDemo
ConsoleMonster.Demos
Types scripted demonstrations into a real PowerShell PTY and records its actual output.
Inheritance
- object
- ConsoleDemo
Methods
public static string Present(DemoScript script, DemoOptions? options = null, Func<ConsoleKeyInfo>? readKey = null, Action<int, int>? stepChanged = null, CancellationToken cancellationToken = default) #Runs a live demo. Enter runs, Space types, b goes back, s skips and q quits. Back does not undo shell side effects.
Parameters
- script ConsoleMonster.Demos.DemoScript
- The PowerShell demo.
- options ConsoleMonster.Demos.DemoOptions? = null
- Child and recording settings.
- readKey System.Func<System.ConsoleKeyInfo>? = null
- Optional key source; defaults to the current terminal.
- stepChanged System.Action<int, int>? = null
- Step counter callback, outside the captured child output.
- cancellationToken System.Threading.CancellationToken = default
- Stops the owned child when cancelled.
Returns
stringpublic static string Record(DemoScript script, DemoOptions? options = null, CancellationToken cancellationToken = default) #Runs every step. The caller controls the child environment and reproducible input data through options.
Parameters
- script ConsoleMonster.Demos.DemoScript
- options ConsoleMonster.Demos.DemoOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
string