Пример #1
0
        internal override void Parse(XElement element)
        {
            Id              = element.ElementAsInt("id");
            LikesCount      = element.ElementAsInt("likes_count");
            Liked           = element.ElementAsBool("likes_count");
            CreatedDateTime = element.ElementAsDateTime("created_at");

            var author = element.Element("author");

            if (author != null)
            {
                Author = new AuthorSummary();
                Author.Parse(author);
            }

            var user = element.Element("user");

            if (author != null)
            {
                User = new UserSummary();
                User.Parse(user);
            }

            var commentsElement = element.Element("comments");

            if (commentsElement != null)
            {
                Comments = new PaginatedList <Comment>();
                Comments.Parse(commentsElement);
            }
        }
Пример #2
0
        internal override void Parse(XElement element)
        {
            Id = element.ElementAsInt("id");
            Body = element.ElementAsString("body");

            var userElement = element.Element("user");
            if (userElement != null)
            {
                User = new UserSummary();
                User.Parse(userElement);
            }

            CreatedAt = element.ElementAsDateTime("created_at");
            UpdatedAt = element.ElementAsDateTime("updated_at");
        }
Пример #3
0
        internal override void Parse(XElement element)
        {
            Id   = element.ElementAsLong("id");
            Body = element.ElementAsString("body");

            var userElement = element.Element("user");

            if (userElement != null)
            {
                User = new UserSummary();
                User.Parse(userElement);
            }

            CreatedAt = element.ElementAsDateTime("created_at");
            UpdatedAt = element.ElementAsDateTime("updated_at");
        }
Пример #4
0
        internal override void Parse(XElement element)
        {
            base.Parse(element);

            var userElement = element.Element("user");
            if (userElement != null)
            {
                User = new UserSummary();
                User.Parse(userElement);
            }

            ReadStatuses = element.ParseChildren<ReadStatus>("read_statuses", "read_status");

            var commentsElement = element.Element("comments");
            if (commentsElement != null)
            {
                Comments = new PaginatedList<Comment>();
                Comments.Parse(commentsElement);
            }
        }
Пример #5
0
        internal override void Parse(XElement element)
        {
            base.Parse(element);

            var userElement = element.Element("user");
            if (userElement != null)
            {
                User = new UserSummary();
                User.Parse(userElement);
            }

            ReadStatuses = element.ParseChildren<ReadStatus>("read_statuses", "read_status");

            var commentsElement = element.Element("comments");
            if (commentsElement != null)
            {
                Comments = new PaginatedList<Comment>();
                Comments.Parse(commentsElement);
            }
        }