/// <summary> /// Add an activity for the newly added comment. /// </summary> /// <param name="comment">The added comment.</param> private void AddCommentActivity(PageComment comment) { try { var commentActivity = new PageCommentActivity { Body = comment.Body }; _activityRepository.Add(comment.AuthorId, comment.Target, commentActivity); } catch (SocialRepositoryException ex) { AddMessage(MessageKey, new MessageViewModel(ex.Message, ErrorMessage)); } }
/// <summary> /// Interprets a PageCommentActivity /// </summary> /// <param name="activity">the PageCommentActivity to interpret</param> public void Visit(PageCommentActivity activity) { // Interpret activity and set description. feedModel.Heading = String.Format("{0} commented on \"{1}\".", this.actor, pageName); feedModel.Description = activity.Body; }