< Summary

Class:Itinero.IO.Osm.Restrictions.Barriers.OsmBarrier
Assembly:Itinero.IO.Osm
File(s):/home/runner/work/routing2/routing2/src/Itinero.IO.Osm/Restrictions/Barriers/OsmBarrier.cs
Covered lines:0
Uncovered lines:10
Coverable lines:10
Total lines:37
Line coverage:0% (0 of 10)
Covered branches:0
Total branches:0
Tag:224_14471318300

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%10%
get_Node()100%10%
get_Attributes()100%10%
Create(...)100%10%

File(s)

/home/runner/work/routing2/routing2/src/Itinero.IO.Osm/Restrictions/Barriers/OsmBarrier.cs

#LineLine coverage
 1using System.Collections.Generic;
 2using OsmSharp;
 3
 4namespace Itinero.IO.Osm.Restrictions.Barriers;
 5
 6/// <summary>
 7/// Represents an OSM barrier.
 8/// </summary>
 9public class OsmBarrier
 10{
 011    private OsmBarrier(long node, IEnumerable<(string key, string value)> attributes)
 012    {
 013        this.Node = node;
 014        this.Attributes = attributes;
 015    }
 16
 17    /// <summary>
 18    /// The node where the barrier exists at.
 19    /// </summary>
 020    public long Node { get; }
 21
 22    /// <summary>
 23    /// The attributes associated with the barrier.
 24    /// </summary>
 025    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)
 034    {
 035        return new OsmBarrier(node, attributes);
 036    }
 37}