Пример #1
0
        /// <summary>
        /// Разобрать из json.
        /// </summary>
        /// <param name="response">Ответ сервера.</param>
        /// <returns></returns>
        internal static Military FromJson(VkResponse response)
        {
            var military = new Military
            {
                Unit      = response["unit"],
                UnitId    = response["unit_id"],
                CountryId = response["country_id"],
                From      = response["from"],
                Until     = response["until"]
            };

            return(military);
        }
Пример #2
0
        /// <summary>
        /// Разобрать из json.
        /// </summary>
        /// <param name="response">Ответ сервера.</param>
        /// <returns></returns>
        public static Military FromJson(VkResponse response)
        {
            var military = new Military
            {
                Unit = response["unit"],
                UnitId = response["unit_id"],
                CountryId = response["country_id"],
                From = response["from"],
                Until = response["until"]
            };

            return military;
        }