TerminalExtensions
Namespace: Hex1b
Assembly: Hex1b.dll
Extension methods for creating TerminalWidget.
csharp
public static class TerminalExtensionsInheritance
Object → TerminalExtensions
Methods
Terminal<TParent>(WidgetContext<TParent>, TerminalWidgetHandle)
Creates a TerminalWidget that displays the content of the specified terminal handle.
Parameters:
ctx(WidgetContext<<TParent>>): The widget context.handle(TerminalWidgetHandle): The terminal handle to display.
Returns: TerminalWidget
A new TerminalWidget bound to the handle.
csharp
public static TerminalWidget Terminal<TParent>(this WidgetContext<TParent> ctx, TerminalWidgetHandle handle) where TParent : Hex1bWidgetWhenNotRunning(TerminalWidget, Func<TerminalNotRunningArgs, Hex1bWidget>)
Specifies a fallback widget to display when the terminal is not running.
Parameters:
widget(TerminalWidget): The TerminalWidget to configure.builder(Func<TerminalNotRunningArgs, Hex1bWidget>): A callback that builds the fallback widget. Receives the terminal state and exit code (if completed).
Returns: TerminalWidget
The configured TerminalWidget.
csharp
public static TerminalWidget WhenNotRunning(this TerminalWidget widget, Func<TerminalNotRunningArgs, Hex1bWidget> builder)