public void Delete(Message message) { if (message == null) { throw new ArgumentNullException("message"); } if (message.Project == null) { throw new Exception("Project"); } ProjectSecurity.DemandEdit(message); TimeLinePublisher.Message(message, EngineResource.ActionText_Delete, UserActivityConstants.ActivityActionType, UserActivityConstants.SmallActivity); _messageDao.Delete(message.ID); String objectID = String.Format("{0}_{1}", message.UniqID, message.Project.ID); NotifySource.Instance.GetSubscriptionProvider().UnSubscribe(NotifyConstants.Event_NewCommentForMessage, objectID); }
public void Delete(Message message) { if (message == null) { throw new ArgumentNullException("message"); } if (message.Project == null) { throw new Exception("Project"); } ProjectSecurity.DemandEdit(message); messageDao.Delete(message.ID); var recipients = GetSubscribers(message); if (recipients.Any() && !engineFactory.DisableNotifications) { NotifyClient.Instance.SendAboutMessageDeleting(recipients, message); } UnSubscribe(message); }
public void Delete(int messageID) { _messageDao.Delete(messageID); }