Beispiel #1
0
        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));
        }
Beispiel #2
0
        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)
            });
        }
Beispiel #3
0
        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)
            });
        }
Beispiel #4
0
 private void WriteToFile(string data, string name)
 {
     System.IO.File.WriteAllText(IntegrationConfig.GetBackupFilePath() + name + IntegrationConfig.GetBackupFileType(), data);
 }