VkNet.Model.Post.FromJson C# (CSharp) Метод

FromJson() публичный статический Метод

public static FromJson ( VkResponse response ) : Post
response VkResponse
Результат Post
        public static Post FromJson(VkResponse response)
        {
            if (response["id"] == null)
            {
                return null;
            }
            var post = new Post
            {
                Id = response["id"],
                OwnerId = response["owner_id"],
                FromId = response["from_id"],
                Date = response["date"],
                Text = response["text"],
                ReplyOwnerId = response["reply_owner_id"],
                ReplyPostId = response["reply_post_id"],
                FriendsOnly = response["friends_only"],
                Comments = response["comments"],
                Likes = response["likes"],
                Reposts = response["reposts"],
                PostType = response["post_type"],
                PostSource = response["post_source"],
                Attachments = response["attachments"].ToReadOnlyCollectionOf<Attachment>(x => x),
                Geo = response["geo"],
                SignerId = response["signer_id"],
                CopyPostDate = response["copy_post_date"],
                CopyPostType = response["copy_post_type"],
                CopyOwnerId = response["copy_owner_id"],
                CopyPostId = response["copy_post_id"],
                CopyText = response["copy_text"],
                CopyHistory = response["copy_history"],
                IsPinned = response["is_pinned"],
                CreatedBy = response["created_by"],
                CopyCommenterId = response["copy_commenter_id"],
                CopyCommentId = response["copy_comment_id"],
                CanDelete = response["can_delete"],
                CanEdit = response["can_edit"],
                CanPin = response["can_pin"]
            };

            return post;
        }