public List <List <Route> > GetRoute(string srcAirport, string destAirport, CancellationToken cancellationToken) { try { RouteSearcher route_searcher = new RouteSearcher(cancellationToken, 10); return(route_searcher.SearchRoute(srcAirport, destAirport, SearchResultType.FirstOne)); } catch (Exception ex) { HttpResponseMessage response = this.Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); throw new HttpResponseException(response); } }
public void SearchNoneExistRoute() { RouteSearcher route_searcher = new RouteSearcher(System.Threading.CancellationToken.None, 10); route_searcher.SearchRoute("AER", "None", SearchResultType.AllPossibleRoutes); }
public void SearchShortesRoute() { RouteSearcher route_searcher = new RouteSearcher(System.Threading.CancellationToken.None, 10); route_searcher.SearchRoute("AER", "CEE", SearchResultType.ShortestOne); }