コード例 #1
0
ファイル: RunClass.cs プロジェクト: volynetsdv/25h8.business
        //здесь начинается выполнение фоновой задачи
        public async void Run(IBackgroundTaskInstance taskInstance)
        {
            // Get a deferral, to prevent the task from closing prematurely
            // while asynchronous code is still running.
            BackgroundTaskDeferral deferral = taskInstance.GetDeferral();

            // Download the and save JSON to file.
            await GetJson();

            //Read data from JSON file
            var biddingSearchResults = ReadJson();

            // Update the live tile with the feed items.
            var tileUpdater = new TileUpdater();

            tileUpdater.UpdateTile(biddingSearchResults);


            // Inform the system that the task is finished.
            deferral.Complete();
        }