private static Event projectEvent(oxite_Conferences_Event e)
 {
     return(new Event(e.EventID, e.EventName, e.EventDisplayName, e.Year));
 }
Ejemplo n.º 2
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));
            }
        }