Skip to content

Commit 61ac6e8

Browse files
committed
docs egenration tests
1 parent 8dc0a21 commit 61ac6e8

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/PolylineAlgorithm/Polyline.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,20 @@ namespace PolylineAlgorithm;
2121
public readonly struct Polyline : IEquatable<Polyline> {
2222
private readonly ReadOnlyMemory<char> _value;
2323

24+
/// <summary>
25+
/// Initializes a new instance of the <see cref="Polyline"/> struct with the specified character sequence.
26+
/// </summary>
27+
/// <param name="value">
28+
/// A read-only span of characters representing an encoded polyline.
29+
/// </param>
30+
public Polyline(ReadOnlySpan<char> value) {
31+
if (value.IsEmpty) {
32+
_value = ReadOnlyMemory<char>.Empty;
33+
} else {
34+
_value = new ReadOnlyMemory<char>(value.ToArray());
35+
}
36+
}
37+
2438
/// <summary>
2539
/// Initializes a new, empty instance of the <see cref="Polyline"/> struct.
2640
/// </summary>

0 commit comments

Comments
 (0)