Exemplo n.º 1
0
        /// <summary>
        /// Deletes this work item.
        /// </summary>
        public void Delete()
        {
            if (_jobId == 0)
            {
                throw new NullReferenceException("This work item has no job association, and cannot be deleted.");
            }
            if (_emailAddress == null)
            {
                throw new NullReferenceException("Cannot delete work item with empty email address.");
            }

            WorkItemData dataUtil = GetWorker();

            dataUtil.WorkItemDelete(_jobId, _emailAddress);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Deletes the specified work item.
        /// </summary>
        /// <param name="jobId">The job id.</param>
        /// <param name="emailAddress">The email address.</param>
        public static void Delete(int jobId, string emailAddress)
        {
            WorkItemData dataUtil = GetWorker();

            dataUtil.WorkItemDelete(jobId, emailAddress);
        }