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

# Class AsyncRunner

Namespace
  EchoHub.Client.Services

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
  object
  AsyncRunner

Inherited Members
  object.GetType()
  object.MemberwiseClone()
  object.ToString()
  object.Equals(object)
  object.Equals(object, object)
  object.ReferenceEquals(object, object)
  object.GetHashCode()

## 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