コード例 #1
0
        public static GetUpdatesResponse Parse(dynamic data)
        {
            if (data == null)
            {
                return null;
            }

            var getUpdatesResponse = new GetUpdatesResponse
            {
                Ok = data.ok,
                ErrorCode = data.error_code,
                Description = data.description,
                Result = new List<UpdateResponse>()
            };

            foreach (var result in data.result)
            {
                getUpdatesResponse.Result.Add(UpdateResponse.Parse(result));
            }

            return getUpdatesResponse;
        }
コード例 #2
0
        public static GetUpdatesResponse Parse(dynamic data)
        {
            if (data == null)
            {
                return(null);
            }

            var getUpdatesResponse = new GetUpdatesResponse
            {
                Ok          = data.ok,
                ErrorCode   = data.error_code,
                Description = data.description,
                Result      = new List <UpdateResponse>()
            };

            foreach (var result in data.result)
            {
                getUpdatesResponse.Result.Add(UpdateResponse.Parse(result));
            }

            return(getUpdatesResponse);
        }