コード例 #1
0
        /// <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);
        }
コード例 #2
0
        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;
            }));
        }