Table of Contents

Method Begin

Namespace
Terminal.Gui.App
Assembly
Terminal.Gui.dll

Begin(IRunnable)

Building block API: Creates a SessionToken and prepares the provided IRunnable for execution. Not usually called directly by applications. Use Run(IRunnable, Func<Exception, bool>?) instead.

SessionToken? Begin(IRunnable runnable)

Parameters

runnable IRunnable

The IRunnable to prepare execution for.

Returns

SessionToken

The SessionToken that needs to be passed to the End(SessionToken) method upon completion.

Remarks

This method prepares the provided IRunnable for running. It adds this to the SessionStack, lays out the SubViews, focuses the first element, and draws the runnable on the screen. This is usually followed by starting the main loop, and then the End(SessionToken) method upon termination which will undo these changes.

Raises the IsRunningChanging, IsRunningChanged, and IsModalChanged events.