public async void Run(IBackgroundTaskInstance taskInstance)
        {
            taskDeferral = taskInstance.GetDeferral();

            ledControl = new LedControl();

            await SetupCommunication();
        }
Beispiel #2
0
        public async void Run(IBackgroundTaskInstance taskInstance)
        {
            //
            // TODO: Insert code to perform background work
            //
            // If you start any asynchronous methods here, prevent the task
            // from closing prematurely by using BackgroundTaskDeferral as
            // described in http://aka.ms/backgroundtaskdeferral
            //
            taskDeferral = taskInstance.GetDeferral();

            ledControl = new LedControl();

            await SetupCommunication();
        }