Exemplo n.º 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)));
     }
 }
Exemplo n.º 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));
            }
        }
Exemplo n.º 3
0
 private static UserAnonymous getUserAnonymous(oxite_Comment comment, oxite_User user)
 {
     return(new UserAnonymous(comment.CreatorName, comment.CreatorEmail, comment.CreatorHashedEmail, comment.CreatorUrl));
 }
Exemplo n.º 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));
 }
Exemplo n.º 5
0
 private void detach_oxite_Users(oxite_User entity)
 {
     this.SendPropertyChanging();
     entity.oxite_Language = null;
 }
Exemplo n.º 6
0
 partial void Deleteoxite_User(oxite_User instance);
Exemplo n.º 7
0
 partial void Updateoxite_User(oxite_User instance);
Exemplo n.º 8
0
 partial void Insertoxite_User(oxite_User instance);