Ejemplo n.º 1
0
        private ScheduleItemComment projectComment(oxite_Comment comment, oxite_Conferences_ScheduleItemCommentRelationship sicr, oxite_Conferences_ScheduleItem si, oxite_Conferences_Event e, oxite_User user)
        {
            ScheduleItemCommentSmall parent = comment.ParentCommentID != comment.CommentID ? getParentComment(comment.ParentCommentID) : null;
            Language language = new Language(comment.oxite_Language.LanguageID)
            {
                DisplayName = comment.oxite_Language.LanguageDisplayName,
                Name        = comment.oxite_Language.LanguageName
            };

            if (user.Username != "Anonymous")
            {
                return(new ScheduleItemComment(comment.Body, comment.CreatedDate, getUserAuthenticated(comment, user), comment.CreatorIP, comment.UserAgent, comment.CommentID, language, comment.ModifiedDate, parent, new ScheduleItemSmall(si.ScheduleItemID, e.EventName, si.Slug, si.Title), sicr.Slug, (EntityState)comment.State));
            }
            else
            {
                return(new ScheduleItemComment(comment.Body, comment.CreatedDate, getUserAnonymous(comment, user), comment.CreatorIP, comment.UserAgent, comment.CommentID, language, comment.ModifiedDate, parent, new ScheduleItemSmall(si.ScheduleItemID, e.EventName, si.Slug, si.Title), sicr.Slug, (EntityState)comment.State));
            }
        }
Ejemplo n.º 2
0
 private static ScheduleItemCommentSmall projectScheduleItemCommentSmall(oxite_Comment comment, oxite_Conferences_ScheduleItemCommentRelationship sicr, oxite_User user)
 {
     if (user.Username != "Anonymous")
     {
         return(new ScheduleItemCommentSmall(new CommentSmall(comment.CommentID, comment.CreatedDate, getUserAuthenticated(comment, user)), sicr.Slug));
     }
     else
     {
         return(new ScheduleItemCommentSmall(new CommentSmall(comment.CommentID, comment.CreatedDate, getUserAnonymous(comment, user)), sicr.Slug));
     }
 }