| | | 1 | | using System.Collections.Generic; |
| | | 2 | | using Itinero.Instructions.ToText; |
| | | 3 | | using Itinero.Instructions.Types; |
| | | 4 | | using Itinero.Routes; |
| | | 5 | | |
| | | 6 | | namespace Itinero.Instructions; |
| | | 7 | | |
| | | 8 | | /// <summary> |
| | | 9 | | /// Abstract representation of a route and associated base instructions. |
| | | 10 | | /// </summary> |
| | | 11 | | public interface IRouteAndBaseInstructions |
| | | 12 | | { |
| | | 13 | | /// <summary> |
| | | 14 | | /// The route. |
| | | 15 | | /// </summary> |
| | | 16 | | Route Route { get; } |
| | | 17 | | |
| | | 18 | | /// <summary> |
| | | 19 | | /// The base instructions. |
| | | 20 | | /// </summary> |
| | | 21 | | IReadOnlyList<BaseInstruction> BaseInstructions { get; } |
| | | 22 | | |
| | | 23 | | /// <summary> |
| | | 24 | | /// The supported languages. |
| | | 25 | | /// </summary> |
| | | 26 | | IReadOnlyDictionary<string, IInstructionToText> Languages { get; } |
| | | 27 | | } |
| | | 28 | | |
| | | 29 | | internal class RouteAndBaseInstructions : IRouteAndBaseInstructions |
| | | 30 | | { |
| | 2 | 31 | | internal RouteAndBaseInstructions(Route route, IReadOnlyList<BaseInstruction> baseInstructions, |
| | 2 | 32 | | IReadOnlyDictionary<string, IInstructionToText> languages) |
| | 2 | 33 | | { |
| | 2 | 34 | | this.Route = route; |
| | 2 | 35 | | this.BaseInstructions = baseInstructions; |
| | 2 | 36 | | this.Languages = languages; |
| | 2 | 37 | | } |
| | | 38 | | |
| | 2 | 39 | | public Route Route { get; } |
| | | 40 | | |
| | 2 | 41 | | public IReadOnlyList<BaseInstruction> BaseInstructions { get; } |
| | | 42 | | |
| | 2 | 43 | | public IReadOnlyDictionary<string, IInstructionToText> Languages { get; } |
| | | 44 | | } |