Method Run | Terminal.Gui v2 (original) (raw)

Namespace

Terminal.Gui

Assembly

Terminal.Gui.dll

Run(Func<Exception, bool>?, IConsoleDriver?)

public static Toplevel Run(Func<Exception, bool>? errorHandler = null, IConsoleDriver? driver = null)

Parameters

errorHandler Func<Exception, bool>

driver IConsoleDriver

Returns

Toplevel

The created Toplevel object. The caller is responsible for disposing this object.

Run(Func<Exception, bool>?, IConsoleDriver?)

public static T Run<T>(Func<Exception, bool>? errorHandler = null, IConsoleDriver? driver = null) where T : Toplevel, new()

Parameters

errorHandler Func<Exception, bool>

driver IConsoleDriver

The IConsoleDriver to use. If not specified the default driver for the platform will be used ( Terminal.Gui.WindowsDriver, Terminal.Gui.CursesDriver, or Terminal.Gui.NetDriver). Must benull if Init(IConsoleDriver?, string?) has already been called.

Returns

T

The created T object. The caller is responsible for disposing this object.

Type Parameters

T

Run(Toplevel, Func<Exception, bool>?)

Runs the Application using the provided Toplevel view.

public static void Run(Toplevel view, Func<Exception, bool>? errorHandler = null)

Parameters

view Toplevel

The Toplevel to run as a modal.

errorHandler Func<Exception, bool>

RELEASE builds only: Handler for any unhandled exceptions (resumes when returns true, rethrows when null).