public async void Run(IBackgroundTaskInstance taskInstance) { BackgroundTaskDeferral _deferral = taskInstance.GetDeferral(); try { IStorageService storage = new StorageService(); if (storage.LoadLastUser()) { DpLogic dpLogic = new DpLogic(); ToastLogic toastLogic = new ToastLogic(); var notifications = await dpLogic.GetNotifications(); //toastLogic.ShowToast(notifications.First(), false); notifications = storage.SaveNotifications(notifications); notifications.ForEach(x => toastLogic.ShowToast(x, false)); } } catch (Exception) { } finally { _deferral.Complete(); } }
public static void SetupTests(TestContext testContext) { _testContext = testContext; logic = new DpLogic(); }
public DataService(IStorageService storageService) { _dpLogic = new DpLogic(); _storageService = storageService; }