| | 1 | | using System; |
| | 2 | | using System.IO; |
| | 3 | | using Itinero.Network.Mutation; |
| | 4 | | using Itinero.Network.Serialization; |
| | 5 | |
|
| | 6 | | namespace Itinero; |
| | 7 | |
|
| | 8 | | /// <summary> |
| | 9 | | /// Extensions related to the router db. |
| | 10 | | /// </summary> |
| | 11 | | public static class RouterDbExtensions |
| | 12 | | { |
| | 13 | | /// <summary> |
| | 14 | | /// Mutate the router db using a delegate. |
| | 15 | | /// </summary> |
| | 16 | | /// <param name="routerDb">The router db.</param> |
| | 17 | | /// <param name="mutate">The delegate.</param> |
| | 18 | | public static void Mutate(this RouterDb routerDb, Action<RoutingNetworkMutator> mutate) |
| 0 | 19 | | { |
| 0 | 20 | | using var mutable = routerDb.GetMutableNetwork(); |
| 0 | 21 | | mutate(mutable); |
| 0 | 22 | | } |
| | 23 | | } |