Method CallRunnerAsync<T>
Last update: 19.06.2026Namespace: Phoenix.ComponentBuilderAPI
Assembly: Phoenix.ComponentBuilderAPI.dll
CallRunnerAsync<T>(Func<IHarnessRunnerHost, RUNNER, T>)
The builder UI and the runner will not be in the same thread. Use this function to safely access
the runner. The function passed in will be invoked on the runner's thread and any return values
will be provided via the TaskT return value.
Note: Do not access UI elements from the passed in function. Instead, collect results into the returned object and use them from the return value.
Task<T> CallRunnerAsync<T>(Func<IHarnessRunnerHost, RUNNER, T> function)
Parameters
function Func<IHarnessRunnerHost, RUNNER, T>
A function to be invoked on the runner thread. Do not save the passed in objects for later use.
Returns
Task<T>
A task that will contain the result of the function when it is finished.
Type Parameters
T
The object type that the function returns.
CallRunnerAsync<T>(Func<IHarnessRunnerHost, RUNNER, Task<T>>)
The builder UI and the runner will not be in the same thread. Use this function to safely access
the runner. The function passed in will be invoked on the runner's thread and any return values
will be provided via the TaskT return value.
Note: Do not access UI elements from the passed in function. Instead, collect results into the returned object and use them from the return value.
Task<T> CallRunnerAsync<T>(Func<IHarnessRunnerHost, RUNNER, Task<T>> asyncFunction)
Parameters
asyncFunction Func<IHarnessRunnerHost, RUNNER, Task<T>>
A function to be invoked on the runner thread. Do not save the passed in objects for later use.
Returns
Task<T>
A task that will contain the result of the function's task when it is finished.
Type Parameters
T
The object type that the function returns.
CallRunnerAsync(Action<IHarnessRunnerHost, RUNNER>)
The builder UI and the runner will not be in the same thread. Use this function to safely access the runner. The action passed in will be invoked on the runner's thread.
Note: Do not access UI elements from the passed in action. If you need results from the runner,
use the overload that returns a value. Phoenix.ComponentBuilderAPI.IHarnessBuilderUIHost1.CallRunnerAsync1(System.Func{Phoenix.ComponentAPI.IHarnessRunnerHost,`0,0})`
Task CallRunnerAsync(Action<IHarnessRunnerHost, RUNNER> action)
Parameters
action Action<IHarnessRunnerHost, RUNNER>
The action to be invoked on the runner thread. Do not save the passed in objects for later use.
Returns
A task that will be completed when the action has finished running.
CallRunnerAsync(Func<IHarnessRunnerHost, RUNNER, Task>)
The builder UI and the runner will not be in the same thread. Use this function to safely access the runner. The action passed in will be invoked on the runner's thread.
Note: Do not access UI elements from the passed in action. If you need results from the runner,
use the overload that returns a value. Phoenix.ComponentBuilderAPI.IHarnessBuilderUIHost1.CallRunnerAsync1(System.Func{Phoenix.ComponentAPI.IHarnessRunnerHost,`0,0})`
Task CallRunnerAsync(Func<IHarnessRunnerHost, RUNNER, Task> asyncAction)
Parameters
asyncAction Func<IHarnessRunnerHost, RUNNER, Task>
The action to be invoked on the runner thread. Do not save the passed in objects for later use.
Returns
A task that will be completed when the action's task has finished.