internal static Comment FromJson(VkResponse response) { var comment = new Comment(); comment.Id = response["id"]; comment.FromId = response["from_id"]; comment.Date = response["date"]; comment.Text = response["text"]; comment.ReplyToUserId = response["reply_to_user"]; comment.ReplyToCommentId = response["reply_to_comment"]; comment.Attachments = response["attachments"]; comment.Likes = response["likes"]; // установлено экcпериментальным путем return comment; }
/// <summary> /// Разобрать из json. /// </summary> /// <param name="response">Ответ сервера.</param> /// <returns></returns> public static Comment FromJson(VkResponse response) { var comment = new Comment { Id = response["id"], FromId = response["from_id"], Date = response["date"], Text = response["text"], ReplyToUserId = response["reply_to_user"], ReplyToCommentId = response["reply_to_comment"], Attachments = response["attachments"], Likes = response["likes"] // установлено экcпериментальным путем }; return comment; }