Ejemplo n.º 1
0
        /// <summary>
        /// Leave a reply for the designated recipients.
        /// </summary>
        /// <param name="reply">Reply to be left.</param>
        /// <param name="emailAddress">User's email address.</param>
        public void LeaveReply(
            string reply,
            string emailAddress)
        {
            // Persist the data to table storage.
            var blogPostReplyEntity = new BlogPostReplyEntity
                {
                    Reply = reply,
                    EmailAddress = emailAddress
                };

            var table = new Table();
            table.AddEntity(blogPostReplyEntity);

            // Create the command object.
            var dispatchMessageCommand = new NewBlogPostReplyCommand
                {
                    BlogPostReplyEntity = blogPostReplyEntity
                };

            // Add the command into queue storage, for later processing.
            var queue = new Queue();
            queue.AddMessage(dispatchMessageCommand);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Flag the blog post reply as having had the relevant moderator's notified.
        /// </summary>
        private void FlagAsModeratorNotified()
        {
            ModeratorsNotified = true;
            ModeratorsNotifiedDateTime = DateTime.UtcNow;

            var table = new Table();
            table.ReplaceEntity(this);
        }