Example #1
0
        public IRoute GetRoute(RouteSpecification spec,
                               RouteType routeType)
        {
            IRouteAlgorithm algorithm =
                this.factory.CreateAlgorithm(routeType);

            return(algorithm.CalculateRoute(spec));
        }
Example #2
0
 public RouteCipher(IRouteAlgorithm algorithm)
 {
     _algorithm = algorithm ?? throw new NullReferenceException("Algorithm provided is null.");
 }
Example #3
0
 public void SetAlgorithm(IRouteAlgorithm algorithm)
 {
     _algorithm = algorithm ?? throw new NullReferenceException("Algorithm provided is null.");
 }
Example #4
0
 public void CalculateRoute(IRouteAlgorithm algorithm)
 {
     routeList = algorithm.Algorithm(startingPoint, routeList);
 }