File tree Expand file tree Collapse file tree
src/PolylineAlgorithm.Abstraction Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,10 +18,31 @@ namespace PolylineAlgorithm.Abstraction;
1818/// Implements the <see cref="IPolylineEncoder{TCoordinate, TPolyline}"/> interface.
1919/// </summary>
2020public abstract class PolylineEncoder < TCoordinate , TPolyline > : IPolylineEncoder < TCoordinate , TPolyline > {
21+ /// <summary>
22+ /// Initializes a new instance of the <see cref="PolylineEncoder{TCoordinate, TPolyline}"/> class
23+ /// using the default <see cref="PolylineEncodingOptions{TCoordinate}"/>.
24+ /// </summary>
25+ public PolylineEncoder ( )
26+ : this ( new PolylineEncodingOptions < TCoordinate > ( ) ) { }
27+
28+ /// <summary>
29+ /// Initializes a new instance of the <see cref="PolylineEncoder{TCoordinate, TPolyline}"/> class
30+ /// with the specified <see cref="PolylineEncodingOptions{TCoordinate}"/>.
31+ /// </summary>
32+ /// <param name="options">
33+ /// The <see cref="PolylineEncodingOptions{TCoordinate}"/> to use for encoding operations.
34+ /// </param>
35+ /// <exception cref="ArgumentNullException">
36+ /// Thrown when <paramref name="options"/> is <see langword="null"/>.
37+ /// </exception>
38+ public PolylineEncoder ( PolylineEncodingOptions < TCoordinate > options ) {
39+ Options = options ?? throw new ArgumentNullException ( nameof ( options ) ) ;
40+ }
41+
2142 /// <summary>
2243 /// Gets the encoding options used by this polyline encoder.
2344 /// </summary>
24- public abstract PolylineEncodingOptions < TCoordinate > Options { get ; }
45+ public PolylineEncodingOptions < TCoordinate > Options { get ; }
2546
2647 /// <summary>
2748 /// Encodes a collection of <typeparamref name="TCoordinate"/> instances into an encoded <typeparamref name="TPolyline"/> string.
You can’t perform that action at this time.
0 commit comments