private async Task RunCatchAsync(CancellationToken token) { try { await Server.RunAsync(token); } catch (Exception e) { BackgroundError?.Invoke(this, new BackgroundErrorEventArgs { Exception = e }); } }
private void OnBackgroundError(ServiceConnectionEventArgs e) { BackgroundError?.Invoke(this, e); }