Ejemplo n.º 1
0
    /// <summary>
    /// Logs activity.
    /// </summary>
    /// <param name="bci">Blog comment info</param>
    /// <param name="nodeId">Document node ID</param>
    /// <param name="culture">Document culture</param>
    private void LogCommentActivity(BlogCommentInfo bci, int nodeId, string culture)
    {
        TreeNode blogPost = DocumentHelper.GetDocument(bci.CommentPostDocumentID, new TreeProvider());
        TreeNode blogNode = BlogHelper.GetParentBlog(bci.CommentPostDocumentID, false);
        string   blogName = (blogNode != null) ? blogNode.GetDocumentName() : null;

        var blogComment = new ActivityBlogComment(bci, blogPost, AnalyticsContext.ActivityEnvironmentVariables);

        if (blogComment.Data != null)
        {
            blogComment.Data.TitleData    = blogName;
            blogComment.Data.ItemDetailID = (blogNode != null ? blogNode.NodeID : 0);
            blogComment.Data.NodeID       = nodeId;
            blogComment.Data.Culture      = culture;
            blogComment.Log();
        }
    }
    /// <summary>
    /// Logs activity.
    /// </summary>
    /// <param name="bci">Blog comment info</param>
    /// <param name="nodeId">Document node ID</param>
    /// <param name="culture">Document culture</param>
    private void LogCommentActivity(BlogCommentInfo bci, int nodeId, string culture)
    {
        TreeNode blogPost = DocumentHelper.GetDocument(bci.CommentPostDocumentID, new TreeProvider());
        TreeNode blogNode = BlogHelper.GetParentBlog(bci.CommentPostDocumentID, false);
        string blogName = (blogNode != null) ? blogNode.GetDocumentName() : null;

        var blogComment = new ActivityBlogComment(bci, blogPost, AnalyticsContext.ActivityEnvironmentVariables);
        if (blogComment.Data != null)
        {
            blogComment.Data.TitleData = blogName;
            blogComment.Data.ItemDetailID = (blogNode != null ? blogNode.NodeID : 0);
            blogComment.Data.NodeID = nodeId;
            blogComment.Data.Culture = culture;
            blogComment.Log();
        }
    }