< Summary

Class:Itinero.Search.RoutingNetworkQuery
Assembly:Itinero
File(s):/home/runner/work/routing2/routing2/src/Itinero/Search/RoutingNetworkQuery.cs
Covered lines:0
Uncovered lines:14
Coverable lines:14
Total lines:31
Line coverage:0% (0 of 14)
Covered branches:0
Total branches:10
Branch coverage:0% (0 of 10)
Tag:224_14471318300

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%10%
Vertices()0%100%

File(s)

/home/runner/work/routing2/routing2/src/Itinero/Search/RoutingNetworkQuery.cs

#LineLine coverage
 1using System.Collections.Generic;
 2using System.Runtime.CompilerServices;
 3using System.Threading;
 4using Itinero.Network;
 5using Itinero.Network.Search;
 6
 7namespace Itinero.Search;
 8
 9internal class RoutingNetworkQuery : IRoutingNetworkQuery
 10{
 11    private readonly RoutingNetwork _network;
 12
 013    public RoutingNetworkQuery(RoutingNetwork network)
 014    {
 015        _network = network;
 016    }
 17    public async IAsyncEnumerable<VertexId> Vertices(
 18        ((double longitude, double latitude, float? e) topLeft, (double longitude, double latitude, float? e) bottomRigh
 19            box, [EnumeratorCancellation] CancellationToken cancellationToken = default)
 020    {
 021        await _network.UsageNotifier.NotifyBox(_network, box, cancellationToken);
 022        if (cancellationToken.IsCancellationRequested) yield break;
 23
 024        var vertices = _network.SearchVerticesInBox(box);
 025        foreach (var (vertex, _) in vertices)
 026        {
 027            if (cancellationToken.IsCancellationRequested) yield break;
 028            yield return vertex;
 029        }
 030    }
 31}

Methods/Properties

.ctor(...)
Vertices()