/// <summary> /// Caller must have already established lock and is on background thread /// </summary> /// <param name="task"></param> private static AdditionalDataTasks UpdateTaskHelper(DataItemTask task) { _conn.InsertOrReplace(task); if (OnTaskUpdated != null) { OnTaskUpdated(null, task); } ToastHelper.HandleOnTaskUpdated(task); var additional = new AdditionalDataTasks(); additional.ResetPrimaryTileTask = ResetPrimaryTileWorker.Instance.Start(); return(additional); }
public static Task <AdditionalDataTasks> AddTaskAsync(DataItemTask task) { return(Execute(delegate { _conn.Insert(task); if (OnTaskAdded != null) { OnTaskAdded(null, task); } var additional = new AdditionalDataTasks(); ToastHelper.HandleOnTaskAdded(task); additional.ResetPrimaryTileTask = ResetPrimaryTileWorker.Instance.Start(); return additional; })); }