コード例 #1
0
        public CommentInfo GetWikiCommentPreview(string commentid, string htmltext)
        {
            var comment = !string.IsNullOrEmpty(commentid) ? _engine.GetComment(new Guid(commentid)) : new Comment();

            comment.Date   = TenantUtil.DateTimeNow();
            comment.UserId = SecurityContext.CurrentAccount.ID;
            comment.Body   = htmltext;

            var info = GetCommentInfo(comment);

            info.IsEditPermissions     = false;
            info.IsResponsePermissions = false;
            return(info);
        }