public List<ClosestStation> ClosestStationResultConvertToClosestStationList(ClosestStationResult csr) { List<ClosestStation> closeststationlist = new List<ClosestStation>(); foreach (var r in csr.response.station) { closeststationlist.Add(ClosestStationJSONConvertToClosestStation(r)); } return closeststationlist; }
public ClosestStation ClosestStationJSONConvertToClosestStation(ClosestStationResult.Response.Station csrrs) { return new ClosestStation(csrrs.distance, csrrs.line, csrrs.name, csrrs.next, csrrs.postal, csrrs.prev, csrrs.x, csrrs.y); }