You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got an app based on a template from the Windows Template Studio for WinUI.
I've got some background tasks to run. There's an IHost so why not use BackgroundService: IHostedService? The template doesn't start or stop the IHost, so I changed ActivationService a little:
This seems to work fine, but I'm curious why it wasn't in the template to begin with. Is there some problem I missed? What's the standard way to run background tasks? Windows.ApplicationModel.Background? That has a lot of complexity that I don't need.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I've got an app based on a template from the Windows Template Studio for WinUI.
I've got some background tasks to run. There's an
IHost
so why not useBackgroundService: IHostedService
? The template doesn't start or stop theIHost
, so I changedActivationService
a little:This seems to work fine, but I'm curious why it wasn't in the template to begin with. Is there some problem I missed? What's the standard way to run background tasks?
Windows.ApplicationModel.Background
? That has a lot of complexity that I don't need.Beta Was this translation helpful? Give feedback.
All reactions