/// <summary> /// Constructs a new instance of <see cref="T:ShippingNetworkModel.DijkstraShortestJourneyTimeFinder" />. /// </summary> /// <param name="shippingNetwork">A network of <see cref="T:ShippingNetworkModel.Data.IShippingNetwork" /> which the finder will work with.</param> public DijkstraShortestJourneyTimeFinder(IShippingNetwork shippingNetwork) { if (shippingNetwork == null) { throw new ArgumentNullException(nameof(shippingNetwork)); } _shippingNetwork = shippingNetwork; }
/// <summary> /// Constructs a new instance of <see cref="T:ShippingNetworkModel.JourneyRouteLimiter" />. /// </summary> /// <param name="shippingNetwork">A network of <see cref="T:ShippingNetworkModel.Data.IShippingNetwork" /> which the limiter will work with.</param> public JourneyRouteLimiter(IShippingNetwork shippingNetwork) { if (shippingNetwork == null) { throw new ArgumentNullException(nameof(shippingNetwork)); } _shippingNetwork = shippingNetwork; }
/// <summary> /// Constructs a new instance of <see cref="T:ShippingNetworkModel.JourneyCalculator" />. /// </summary> /// <param name="shippingNetwork">A network of <see cref="T:ShippingNetworkModel.Data.IShippingNetwork" /> which the calculator will work with.</param> public JourneyCalculator(IShippingNetwork shippingNetwork) { if (shippingNetwork == null) { throw new ArgumentNullException(nameof(shippingNetwork)); } _shippingNetwork = shippingNetwork; _shortestJourneyFinder = new DijkstraShortestJourneyTimeFinder(_shippingNetwork); _journeyRouteLimiter = new JourneyRouteLimiter(_shippingNetwork); }
/// <summary> /// Constructs a new instance of <see cref="T:ShippingNetworkModel.JourneyCalculator" />. /// </summary> /// <param name="shippingNetwork">A network of <see cref="T:ShippingNetworkModel.Data.IShippingNetwork" /> which the calculator will work with.</param> /// <param name="shortestJourneyFinder">A shortest path finder of <see cref="T:ShippingNetworkModel.Data.IShortestJourneyTimeFinder" /> which the calculator will work with.</param> /// <param name="journeyRouteLimiter">A routes limiter of <see cref="T:ShippingNetworkModel.Data.IJourneyRouteLimiter" /> which the calculator will work with.</param> internal JourneyCalculator(IShippingNetwork shippingNetwork, IShortestJourneyTimeFinder shortestJourneyFinder, IJourneyRouteLimiter journeyRouteLimiter) { if (shippingNetwork == null) { throw new ArgumentNullException(nameof(shippingNetwork)); } if (shortestJourneyFinder == null) { throw new ArgumentNullException(nameof(shortestJourneyFinder)); } if (journeyRouteLimiter == null) { throw new ArgumentNullException(nameof(journeyRouteLimiter)); } _shippingNetwork = shippingNetwork; _shortestJourneyFinder = shortestJourneyFinder; _journeyRouteLimiter = journeyRouteLimiter; }