VkNet.Model.Chat.FromJson C# (CSharp) Method

FromJson() public static method

Разобрать из json.
public static FromJson ( VkResponse response ) : Chat
response VkResponse Ответ сервера.
return Chat
        public static Chat FromJson(VkResponse response)
        {
            var chat = new Chat
            {
                Id = response["id"],
                Type = response["type"],
                Title = response["title"],
                AdminId = Utilities.GetNullableLongId(response["admin_id"]),
                Users = response["users"],

                #region Поля найденые експерементально

                Left = response.ContainsKey("left") && response["left"]
            };
            if (response.ContainsKey("push_settings"))
            {
                chat.Sound = response["push_settings"]["sound"];
                chat.DisabledUntil = response["push_settings"]["disabled_until"];
            } else
            {
                chat.Sound = null;
                chat.DisabledUntil = null;
            }
            #endregion

            return chat;
        }