public List <IFlight> GetDirectFlightsByTripParams(ITripParams tripParams) { Flight flight = new Flight(); string text = System.IO.File.ReadAllText(IntegrationConfig.GetBackupFilePath() + flight.GetType().ToString() + IntegrationConfig.GetBackupFileType()); return(new List <IFlight>() { _serializer.Deserialize <Flight>(text) }); }
public List <IRoute> GetRouteWith1Stop(ITripParams tripParams) { Route route = new Route(); string text = System.IO.File.ReadAllText(IntegrationConfig.GetBackupFilePath() + route.GetType().ToString() + IntegrationConfig.GetBackupFileType()); return(new List <IRoute>() { _serializer.Deserialize <Route>(text) }); }
private void WriteToFile(string data, string name) { System.IO.File.WriteAllText(IntegrationConfig.GetBackupFilePath() + name + IntegrationConfig.GetBackupFileType(), data); }
public ILocations GetLocationsAll() { Locations locations = new Locations(); string text = System.IO.File.ReadAllText(IntegrationConfig.GetBackupFilePath() + locations.GetType().ToString() + IntegrationConfig.GetBackupFileType()); return(_serializer.Deserialize <Locations>(text)); }