private async Task RunBackgroundTask(IBackgroundTask task, IDeferral deferral) { try { await task.RunAsync(); } catch (Exception ex) { Debug.WriteLine($"AppModel: Background task \"{task.Id}\" failed: {ex}"); } finally { deferral.EndDeferral(); } }
private async Task RunBackgroundTask(IBackgroundTask task, IDeferral deferral) { try { await task.RunAsync(); } catch (Exception ex) { Debug.WriteLine($"AppModel: Background task \"{task.Id}\" failed: {ex}"); } finally { deferral.EndDeferral(); } }