internal 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; }
internal static GetUpdatesResponse Parse(JsonData data) { if (data == null) { return null; } var getUpdatesResponse = new GetUpdatesResponse { Ok = data.Get<bool>("ok"), ErrorCode = data.Get<int?>("error_code"), Description = data.Get<string>("description"), Result = new List<UpdateResponse>() }; foreach (var result in data.GetJsonList("result")) { getUpdatesResponse.Result.Add(UpdateResponse.Parse(result)); } return getUpdatesResponse; }
internal static GetUpdatesResponse Parse(JsonData data) { if (data == null) { return(null); } var getUpdatesResponse = new GetUpdatesResponse { Ok = data.Get <bool>("ok"), ErrorCode = data.Get <int?>("error_code"), Description = data.Get <string>("description"), Result = new List <UpdateResponse>() }; foreach (var result in data.GetJsonList("result")) { getUpdatesResponse.Result.Add(UpdateResponse.Parse(result)); } return(getUpdatesResponse); }