コード例 #1
0
 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);
     }
 }
コード例 #2
0
        public void SearchNoneExistRoute()
        {
            RouteSearcher route_searcher = new RouteSearcher(System.Threading.CancellationToken.None, 10);

            route_searcher.SearchRoute("AER", "None", SearchResultType.AllPossibleRoutes);
        }
コード例 #3
0
        public void SearchShortesRoute()
        {
            RouteSearcher route_searcher = new RouteSearcher(System.Threading.CancellationToken.None, 10);

            route_searcher.SearchRoute("AER", "CEE", SearchResultType.ShortestOne);
        }