Упоминание.
Example #1
0
File: Mention.cs Project: igofed/vk
        /// <summary>
        /// Разобрать из json.
        /// </summary>
        /// <param name="response">Ответ сервера.</param>
        /// <returns></returns>
        internal static Mention FromJson(VkResponse response)
        {
            var mention = new Mention();

            mention.Id          = response["id"];
            mention.FromId      = response["from_id"];
            mention.Date        = response["date"];
            mention.Text        = response["text"];
            mention.Likes       = response["likes"];
            mention.Comments    = response["comments"];
            mention.Attachment  = response["attachment"];
            mention.Geo         = response["geo"];
            mention.CopyOwnerId = response["copy_owner_id"];
            mention.CopyPostId  = response["copy_post_id"];
            mention.ToId        = response["to_id"];
            mention.PostId      = response["post_id"];
            mention.PostType    = response["post_type"];
            mention.Reposts     = response["reposts"];

            return(mention);
        }
Example #2
0
        /// <summary>
        /// Разобрать из json.
        /// </summary>
        /// <param name="response">Ответ сервера.</param>
        /// <returns></returns>
        internal static Mention FromJson(VkResponse response)
        {
            var mention = new Mention
            {
                Id          = response["id"],
                FromId      = response["from_id"],
                Date        = response["date"],
                Text        = response["text"],
                Likes       = response["likes"],
                Comments    = response["comments"],
                Attachment  = response["attachment"],
                Geo         = response["geo"],
                CopyOwnerId = response["copy_owner_id"],
                CopyPostId  = response["copy_post_id"],
                ToId        = response["to_id"],
                PostId      = response["post_id"],
                PostType    = response["post_type"],
                Reposts     = response["reposts"]
            };

            return(mention);
        }
Example #3
0
File: Mention.cs Project: vknet/vk
        /// <summary>
        /// Разобрать из json.
        /// </summary>
        /// <param name="response">Ответ сервера.</param>
        /// <returns></returns>
        public static Mention FromJson(VkResponse response)
        {
            var mention = new Mention
            {
                Id = response["id"],
                FromId = response["from_id"],
                Date = response["date"],
                Text = response["text"],
                Likes = response["likes"],
                Comments = response["comments"],
                Attachment = response["attachment"],
                Geo = response["geo"],
                CopyOwnerId = response["copy_owner_id"],
                CopyPostId = response["copy_post_id"],
                ToId = response["to_id"],
                PostId = response["post_id"],
                PostType = response["post_type"],
                Reposts = response["reposts"]
            };

            return mention;
        }
Example #4
0
        /// <summary>
        /// Разобрать из json.
        /// </summary>
        /// <param name="response">Ответ сервера.</param>
        /// <returns></returns>
        internal static Mention FromJson(VkResponse response)
        {
            var mention = new Mention();
            mention.Id = response["id"];
            mention.FromId = response["from_id"];
            mention.Date = response["date"];
            mention.Text = response["text"];
            mention.Likes = response["likes"];
            mention.Comments = response["comments"];
            mention.Attachment = response["attachment"];
            mention.Geo = response["geo"];
            mention.CopyOwnerId = response["copy_owner_id"];
            mention.CopyPostId = response["copy_post_id"];
            mention.ToId = response["to_id"];
            mention.PostId = response["post_id"];
            mention.PostType = response["post_type"];
            mention.Reposts = response["reposts"];

            return mention;
        }