Exemplo n.º 1
0
 public UserCommentsViewModel(User user, bool?invert = null)
 {
     if (user != null)
     {
         UserId       = user.Id;
         UserFullName = user.FullName;
         Comments     = new _CommentsViewModel(user, invert);
     }
 }
Exemplo n.º 2
0
 public UserCommentsViewModel(User user, bool? invert = null)
 {
     if (user != null)
     {
         UserId = user.Id;
         UserFullName = user.FullName;
         Comments = new _CommentsViewModel(user, invert);
     }
 }
Exemplo n.º 3
0
        public _CommentsBlockViewModel(Content content, bool? invert = null)
        {
            if (content != null)
            {
                ContentId = content.Id;
                IsDiscussionClosed = content.IsDiscussionClosed;

                if (content.GroupId.HasValue && UserContext.Current != null && !GroupService.IsUserApprovedInGroup(UserContext.Current.Id, content.Group) && content.Group.PrivacyEnum.HasFlag(GroupPrivacy.PrivateDiscussion))
                    IsDiscussionUnavailable = true;

                Comments = new _CommentsViewModel(content, invert);
            }
        }
Exemplo n.º 4
0
        public _CommentsBlockViewModel(Content content, bool?invert = null)
        {
            if (content != null)
            {
                ContentId          = content.Id;
                IsDiscussionClosed = content.IsDiscussionClosed;

                if (content.GroupId.HasValue && UserContext.Current != null && !GroupService.IsUserApprovedInGroup(UserContext.Current.Id, content.Group) && content.Group.PrivacyEnum.HasFlag(GroupPrivacy.PrivateDiscussion))
                {
                    IsDiscussionUnavailable = true;
                }

                Comments = new _CommentsViewModel(content, invert);
            }
        }