Constructor TaskRunner
TaskRunner(Action<bool>?)
Initializes a new instance of the TaskRunner class using the current UI thread and synchronization context. Must be called on the UI thread that this task runner will be associated with.
Declaration
public TaskRunner(Action<bool>? busyChangedAction = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Action<bool> | busyChangedAction | Optional action to execute on the UI thread whenever busy state changes. Can be used to control UI state when busy tasks are running, such as disabling input or showing a loading spinner. |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | A current synchronization context was not found. |