| | 1 | | namespace Itinero.Routing; |
| | 2 | |
|
| | 3 | | /// <summary> |
| | 4 | | /// Abstract representation of a router configured for weight calculations. |
| | 5 | | /// </summary> |
| | 6 | | /// <typeparam name="T"></typeparam> |
| | 7 | | public interface IRouterWeights<out T> |
| | 8 | | where T : IRouter |
| | 9 | | { |
| | 10 | | /// <summary> |
| | 11 | | /// Gets the router. |
| | 12 | | /// </summary> |
| | 13 | | T Router { get; } |
| | 14 | | } |
| | 15 | |
|
| | 16 | | internal class RouterWeights<T> : IRouterWeights<T> |
| | 17 | | where T : IRouter |
| | 18 | | { |
| 0 | 19 | | public RouterWeights(T router) |
| 0 | 20 | | { |
| 0 | 21 | | this.Router = router; |
| 0 | 22 | | } |
| | 23 | |
|
| 0 | 24 | | public T Router { get; } |
| | 25 | | } |