Exemplo n.º 1
0
        private static void ThreadProc()
        {
            SindbadAPIController.journey = new Journey(post.fromCityName, post.toCityName, post.maxPrice, post.attractions, post.startDate,
               post.endDate, post.adultsNum, post.childrenNum, post.infantsNum, post.direct, post.travelClass , post.ifCar);

            while(!SindbadAPIController.journey.finished){}
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            // GoogleAttractions[] attractions = new GoogleAttractions[4] {GoogleAttractions.AMUSE_PARK , GoogleAttractions.BAR , GoogleAttractions.CASINO , GoogleAttractions.NIGHT_CLUB} ;
            Journey journey = new Journey("Paris", "London", 1000000, "food|zoo", "2015-07-25", "2015-07-30", 3, 2, 1, true, TRAVEL_CLASS.ECONOMY , true);

            Thread thread = new Thread(ThreadProc);

            thread.Start();
            thread.Join();
        }