jeudi 10 décembre 2015

Use classes from main project in background task

How can I use classes which are part of the main project in a background task project. I wrote a helper class that manages operations on the local sqlite database, do I have to duplicate this class and copy it to the project of the background task or can it be shared in an other way? The main goal is to populate the local database in a background thread, triggered by events like TimeZoneChange

What is the common approach to access classes and references in the main project from a background thread? Back in the days of Windows 8 a shared project could be used to share classes via referencing - is this still working on UWP or are there any other recommendations?

This is the current structure of the main project and the background task - I want to use i.e. DatabaseHelper.cs in the background task

enter image description here

Aucun commentaire:

Enregistrer un commentaire