| | | 1 | | using System.Collections.Generic; |
| | | 2 | | using OsmSharp; |
| | | 3 | | |
| | | 4 | | namespace Itinero.IO.Osm.Restrictions.Barriers; |
| | | 5 | | |
| | | 6 | | /// <summary> |
| | | 7 | | /// Represents an OSM barrier. |
| | | 8 | | /// </summary> |
| | | 9 | | public class OsmBarrier |
| | | 10 | | { |
| | 0 | 11 | | private OsmBarrier(long node, IEnumerable<(string key, string value)> attributes) |
| | 0 | 12 | | { |
| | 0 | 13 | | this.Node = node; |
| | 0 | 14 | | this.Attributes = attributes; |
| | 0 | 15 | | } |
| | | 16 | | |
| | | 17 | | /// <summary> |
| | | 18 | | /// The node where the barrier exists at. |
| | | 19 | | /// </summary> |
| | 0 | 20 | | public long Node { get; } |
| | | 21 | | |
| | | 22 | | /// <summary> |
| | | 23 | | /// The attributes associated with the barrier. |
| | | 24 | | /// </summary> |
| | 0 | 25 | | public IEnumerable<(string key, string value)> Attributes { get; } |
| | | 26 | | |
| | | 27 | | /// <summary> |
| | | 28 | | /// Creates a new barrier. |
| | | 29 | | /// </summary> |
| | | 30 | | /// <param name="node">The node.</param> |
| | | 31 | | /// <param name="attributes">The attributes.</param> |
| | | 32 | | /// <returns>The barrier.</returns> |
| | | 33 | | public static OsmBarrier Create(long node, IEnumerable<(string key, string value)> attributes) |
| | 0 | 34 | | { |
| | 0 | 35 | | return new OsmBarrier(node, attributes); |
| | 0 | 36 | | } |
| | | 37 | | } |