LeftTwixWand / Inventory

New version of Microsoft Inventory sample, built on WinUI 3, using DDD and Clean Architecture approach
MIT License
71 stars 10 forks source link

Feature Request : Background Services #19

Open dicksonkimeu opened 1 year ago

dicksonkimeu commented 1 year ago

How can background services be added as used to be in UWP ?

LeftTwixWand commented 1 year ago

Hi, thank you for this issue!

I think there are two options to do it:

  1. To use Windows.ApplicationModel.Background. This namespace already contains a lot of good stuff to organize your background activity. You can try to create an empty UWP project, using Template Studio for UWP, because it has already implemented feature for the simple background task management. Template Studio wizard

  2. To use some 3d party solution, like Hangfire. Such ready-to-use solutions already has many cool features, like background tasks persistence, scheduling and so on.

Honestly, I haven't worked with Windows.ApplicationModel.Background namespace before, so it's difficult to say, how usable it is. But your idea with some background services is cool, and I've already thought about it. It definitely has its place in this project.

LeftTwixWand commented 1 year ago

Also, in the Windows Community Toolkit there is some implementation for the Background Tasks management. Seems, that it has some build in functionality. Background tasks

You can download the sample app from the Store. Or through the Winget:

winget install "Windows Community Toolkit Sample App"