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

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