Пример #1
0
        public IEnumerable <RootPath> FindPaths(ulong targetObj, int maxResults, int maxLocalRoots, int maxDepth, bool runInParallel)
        {
            RootPathFinder pathFinder;

            if (runInParallel)
            {
                pathFinder = new ParallelBreadthFirstRootPathFinder(this, targetObj);
            }
            else
            {
                pathFinder = new BreadthFirstRootPathFinder(this, targetObj);
            }
            pathFinder.MaxResults    = maxResults;
            pathFinder.MaxLocalRoots = maxLocalRoots;
            pathFinder.MaxDepth      = maxDepth;
            pathFinder.FindPaths();
            return(pathFinder.Paths);
        }
Пример #2
0
 public IEnumerable<RootPath> FindPaths(ulong targetObj, int maxResults, int maxLocalRoots, int maxDepth, bool runInParallel)
 {
     RootPathFinder pathFinder;
     if (runInParallel)
     {
         pathFinder = new ParallelBreadthFirstRootPathFinder(this, targetObj);
     }
     else
     {
         pathFinder = new BreadthFirstRootPathFinder(this, targetObj);
     }
     pathFinder.MaxResults = maxResults;
     pathFinder.MaxLocalRoots = maxLocalRoots;
     pathFinder.MaxDepth = maxDepth;
     pathFinder.FindPaths();
     return pathFinder.Paths;
 }