| | 1 | | namespace Itinero.Routing; |
| | 2 | |
|
| | 3 | | /// <summary> |
| | 4 | | /// Contains extension methods for weight routers. |
| | 5 | | /// </summary> |
| | 6 | | public static class IRouterWeightsExtensions |
| | 7 | | { |
| | 8 | | /// <summary> |
| | 9 | | /// Configures the router to calculate weights. |
| | 10 | | /// </summary> |
| | 11 | | /// <param name="router">The router.</param> |
| | 12 | | /// <returns>A weights configured router.</returns> |
| | 13 | | public static IRouterWeights<IRouterOneToOne> Weights(this IRouterOneToOne router) |
| 0 | 14 | | { |
| 0 | 15 | | return new RouterWeights<IRouterOneToOne>(router); |
| 0 | 16 | | } |
| | 17 | |
|
| | 18 | | /// <summary> |
| | 19 | | /// Configures the router to calculate weights. |
| | 20 | | /// </summary> |
| | 21 | | /// <param name="router">The router.</param> |
| | 22 | | /// <returns>A weights configured router.</returns> |
| | 23 | | public static IRouterWeights<IRouterManyToOne> Weights(this IRouterManyToOne router) |
| 0 | 24 | | { |
| 0 | 25 | | return new RouterWeights<IRouterManyToOne>(router); |
| 0 | 26 | | } |
| | 27 | |
|
| | 28 | | /// <summary> |
| | 29 | | /// Configures the router to calculate weights. |
| | 30 | | /// </summary> |
| | 31 | | /// <param name="router">The router.</param> |
| | 32 | | /// <returns>A weights configured router.</returns> |
| | 33 | | public static IRouterWeights<IRouterOneToMany> Weights(this IRouterOneToMany router) |
| 0 | 34 | | { |
| 0 | 35 | | return new RouterWeights<IRouterOneToMany>(router); |
| 0 | 36 | | } |
| | 37 | |
|
| | 38 | | /// <summary> |
| | 39 | | /// Configures the router to calculate weights. |
| | 40 | | /// </summary> |
| | 41 | | /// <param name="router">The router.</param> |
| | 42 | | /// <returns>A weights configured router.</returns> |
| | 43 | | public static IRouterWeights<IRouterManyToMany> Weights(this IRouterManyToMany router) |
| 0 | 44 | | { |
| 0 | 45 | | return new RouterWeights<IRouterManyToMany>(router); |
| 0 | 46 | | } |
| | 47 | | } |