We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b54819f commit cdc34c8Copy full SHA for cdc34c8
src/PolylineAlgorithm/PolylineEncoder.cs
@@ -45,11 +45,16 @@ public Polyline Encode(IEnumerable<Coordinate> coordinates) {
45
46
return writer.ToPolyline();
47
48
+ /// <summary>
49
+ /// Gets the count of coordinates in the enumerable.
50
+ /// </summary>
51
+ /// <param name="coordinates">The enumerable of coordinates.</param>
52
+ /// <returns>The count of coordinates.</returns>
53
[ExcludeFromCodeCoverage]
54
[MethodImpl(MethodImplOptions.AggressiveInlining)]
55
static int GetCount(ref readonly IEnumerable<Coordinate> coordinates) => coordinates switch {
56
ICollection<Coordinate> collection => collection.Count,
57
_ => coordinates.Count(),
58
};
59
}
-}
60
+}
0 commit comments