Beispiel #1
0
 private static CommentSmall projectCommentSmall(oxite_Comment comment, oxite_User user)
 {
     if (user.Username != "Anonymous")
     {
         return(new CommentSmall(comment.CommentID, comment.CreatedDate, getUserAuthenticated(comment, user)));
     }
     else
     {
         return(new CommentSmall(comment.CommentID, comment.CreatedDate, getUserAnonymous(comment, user)));
     }
 }
Beispiel #2
0
        private Comment getComment(oxite_Comment comment, oxite_User user)
        {
            CommentSmall 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 Comment(comment.Body, comment.CreatedDate, getUserAuthenticated(comment, user), comment.CreatorIP, comment.UserAgent, comment.CommentID, language, comment.ModifiedDate, parent, (EntityState)comment.State));
            }
            else
            {
                return(new Comment(comment.Body, comment.CreatedDate, getUserAnonymous(comment, user), comment.CreatorIP, comment.UserAgent, comment.CommentID, language, comment.ModifiedDate, parent, (EntityState)comment.State));
            }
        }
Beispiel #3
0
 private static UserAnonymous getUserAnonymous(oxite_Comment comment, oxite_User user)
 {
     return(new UserAnonymous(comment.CreatorName, comment.CreatorEmail, comment.CreatorHashedEmail, comment.CreatorUrl));
 }
Beispiel #4
0
 private static User getUserAuthenticated(oxite_Comment comment, oxite_User user)
 {
     return(new User(user.UserID, user.Username, user.DisplayName, user.Email, user.HashedEmail, (EntityState)user.Status));
 }
Beispiel #5
0
 private void detach_oxite_Users(oxite_User entity)
 {
     this.SendPropertyChanging();
     entity.oxite_Language = null;
 }
Beispiel #6
0
 partial void Deleteoxite_User(oxite_User instance);
Beispiel #7
0
 partial void Updateoxite_User(oxite_User instance);
Beispiel #8
0
 partial void Insertoxite_User(oxite_User instance);