@@ -30,8 +30,6 @@ public static class PolylineDecoderExtensions {
3030 /// Thrown when <paramref name="decoder"/> is <see langword="null"/>.
3131 /// </exception>
3232 public static IEnumerable < Coordinate > Decode ( this IPolylineDecoder < Polyline , Coordinate > decoder , string polyline ) {
33- Debug . Assert ( decoder is not null , "Decoder cannot be null." ) ;
34-
3533 if ( decoder is null ) {
3634 throw new ArgumentNullException ( nameof ( decoder ) ) ;
3735 }
@@ -55,18 +53,29 @@ public static IEnumerable<Coordinate> Decode(this IPolylineDecoder<Polyline, Coo
5553 /// Thrown when <paramref name="decoder"/> is <see langword="null"/>.
5654 /// </exception>
5755 public static IEnumerable < Coordinate > Decode ( this IPolylineDecoder < Polyline , Coordinate > decoder , char [ ] polyline ) {
58- Debug . Assert ( decoder is not null , "Decoder cannot be null." ) ;
59-
6056 if ( decoder is null ) {
6157 throw new ArgumentNullException ( nameof ( decoder ) ) ;
6258 }
6359
6460 return decoder . Decode ( Polyline . FromCharArray ( polyline ) ) ;
6561 }
6662
63+ /// <summary>
64+ /// Decodes an encoded polyline represented as a read-only memory of characters into a sequence of geographic coordinates.
65+ /// </summary>
66+ /// <param name="decoder">
67+ /// The <see cref="IPolylineDecoder{TPolyline, TCoordinate}"/> instance used to perform the decoding operation.
68+ /// </param>
69+ /// <param name="polyline">
70+ /// The encoded polyline as a read-only memory of characters to decode.
71+ /// </param>
72+ /// <returns>
73+ /// An <see cref="IEnumerable{Coordinate}"/> containing the decoded latitude and longitude pairs.
74+ /// </returns>
75+ /// <exception cref="ArgumentNullException">
76+ /// Thrown when <paramref name="decoder"/> is <see langword="null"/>.
77+ /// </exception>
6778 public static IEnumerable < Coordinate > Decode ( this IPolylineDecoder < Polyline , Coordinate > decoder , ReadOnlyMemory < char > polyline ) {
68- Debug . Assert ( decoder is not null , "Decoder cannot be null." ) ;
69-
7079 if ( decoder is null ) {
7180 throw new ArgumentNullException ( nameof ( decoder ) ) ;
7281 }
0 commit comments