示例#1
0
文件: Runner.cs 项目: trystan/theseus
 public Runner(List <IFact <T> > facts, FactFinder factFinder, PathFinder pathFinder, PathRunner pathRunner)
 {
     Facts      = facts;
     FactFinder = factFinder;
     Pathfinder = pathFinder;
     PathRunner = pathRunner;
 }
示例#2
0
文件: Runner.cs 项目: trystan/theseus
        public Task <T> RunShortestPath(T initialState, string from, string to)
        {
            var path = GetShortestPath(from, to);

            if (path == null)
            {
                throw new ArgumentException("There is no path from " + from + " to " + to, "to");
            }

            return(PathRunner.Run(initialState, path));
        }