internal static Poll FromJson(VkResponse response) { var poll = new Poll(); poll.Id = response["id"]; poll.OwnerId = response["owner_id"]; poll.Question = response["question"]; return poll; }
internal static Poll FromJson(VkResponse response) { var poll = new Poll(); poll.Id = response["id"]; poll.OwnerId = response["owner_id"]; poll.Question = response["question"]; poll.Created = response["created"]; poll.Votes = response["votes"]; poll.AnswerId = response["answer_id"]; poll.IsAnonymous = response["anonymous"]; poll.Answers = response["answers"]; return poll; }
/// <summary> /// Разобрать из json. /// </summary> /// <param name="response">Ответ сервера.</param> /// <returns></returns> internal static Poll FromJson(VkResponse response) { var poll = new Poll { Id = response["id"] ?? response["poll_id"], OwnerId = response["owner_id"], Question = response["question"], Created = response["created"], Votes = response["votes"], AnswerId = response["answer_id"], IsAnonymous = response["anonymous"], Answers = response["answers"] }; return poll; }