//TODO:Singleton olacak public List <CountryDTO> GetCountry() { if (FileIOHelper.FileExists(_countryFileName) == false) { UpdateCountries(); } try { var taskResponse = Helpers.FileIOHelper.ReadData(_countryFileName); return(JsonConvert.DeserializeObject <List <CountryDTO> >(taskResponse.Result)); } catch (StackOverflowException ex) { throw (ex); } }
public List <VehicleDTO> GetVehicles() { #if DEBUG return(getVehicleMockData()); #else if (FileIOHelper.FileExists(_vehicleFileName) == false) { UpdateVehicles(); } try { var taskResponse = Helpers.FileIOHelper.ReadData(_vehicleFileName); return((List <VehicleDTO>)JsonConvert.DeserializeObject <List <VehicleDTO> >(taskResponse.Result)); } catch (StackOverflowException ex) { throw (ex); } #endif }