Table of Contents

Method Invoke

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

Invoke(Action<IApplication>)

Runs action on the main UI loop thread.

[Obsolete("The legacy static Application object is going away.")]
public static void Invoke(Action<IApplication> action)

Parameters

action Action<IApplication>

The action to be invoked on the main processing thread.

Remarks

If called from the main thread, the action is executed immediately. Otherwise, it is queued via AddTimeout(TimeSpan, Func<bool>) with Zero and will be executed on the next main loop iteration.

Exceptions

NotInitializedException

Thrown when Init(string?) has not been called or after Dispose() has been called.

Invoke(Action)

Runs action on the main UI loop thread.

[Obsolete("The legacy static Application object is going away.")]
public static void Invoke(Action action)

Parameters

action Action

The action to be invoked on the main processing thread.

Remarks

If called from the main thread, the action is executed immediately. Otherwise, it is queued via AddTimeout(TimeSpan, Func<bool>) with Zero and will be executed on the next main loop iteration.

Exceptions

NotInitializedException

Thrown when Init(string?) has not been called or after Dispose() has been called.