Table of Contents

Class AsyncRunner

Namespace
EchoHub.Client
Assembly
EchoHub.Client.dll

Eliminates repeated Task.Run/try/catch/app.Invoke(ShowError) boilerplate. Runs async work on a background thread and routes exceptions to the UI.

public static class AsyncRunner
Inheritance
AsyncRunner
Inherited Members

Methods

Run(IApplication, Func<Task>, Action<string>, string, string?)

public static void Run(IApplication app, Func<Task> work, Action<string> showError, string errorPrefix, string? logContext = null)

Parameters

app IApplication
work Func<Task>
showError Action<string>
errorPrefix string
logContext string