Skip to content

Commit 684d9c0

Browse files
committed
update
1 parent 3bebe19 commit 684d9c0

File tree

20 files changed

+65
-81
lines changed

20 files changed

+65
-81
lines changed

benchmarks/PolylineAlgorithm.Benchmarks/PolylineBuilderBenchmark.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ namespace PolylineAlgorithm.Benchmarks;
77

88
using BenchmarkDotNet.Attributes;
99
using PolylineAlgorithm;
10+
using PolylineAlgorithm.Internal;
1011
using PolylineAlgorithm.Utility;
1112

1213
/// <summary>
@@ -44,7 +45,7 @@ public class PolylineBuilderBenchmark {
4445

4546
public char[] CopyToDestination { get; private set; }
4647

47-
internal Polyline.PolylineBuilder Builder { get; private set; }
48+
internal PolylineBuilder Builder { get; private set; }
4849

4950
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring as nullable.
5051

@@ -54,7 +55,7 @@ public class PolylineBuilderBenchmark {
5455
/// </summary>
5556
[GlobalSetup]
5657
public void SetupData() {
57-
Builder = new Polyline.PolylineBuilder();
58+
Builder = new PolylineBuilder();
5859

5960
var polyline = ValueProvider.GetPolyline(Count);
6061
StringValue = polyline.ToString();

benchmarks/PolylineAlgorithm.Benchmarks/PolylineDecoderBenchmark.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class PolylineDecoderBenchmark {
3232
/// <summary>
3333
/// The polyline decoder instance.
3434
/// </summary>
35-
public DefaultPolylineDecoder Decoder = new();
35+
public PolylineDecoder Decoder = new();
3636

3737
/// <summary>
3838
/// Sets up the data for the benchmarks.

benchmarks/PolylineAlgorithm.Benchmarks/PolylineEncoderBenchmark.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class PolylineEncoderBenchmark {
3434
/// <summary>
3535
/// The polyline encoder instance.
3636
/// </summary>
37-
public DefaultPolylineEncoder Encoder = new();
37+
public PolylineEncoder Encoder = new();
3838

3939
/// <summary>
4040
/// The async polyline encoder instance.

benchmarks/PolylineAlgorithm.Comparison.Benchmarks/PolylineDecoderBenchmark.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class PolylineDecoderBenchmark {
4040
/// <summary>
4141
/// The polyline decoder instance.
4242
/// </summary>
43-
public DefaultPolylineDecoder PolylineAlgorithm = new();
43+
public PolylineDecoder PolylineAlgorithm = new();
4444

4545
public PolylineEncoding Cloudikka = new();
4646

benchmarks/PolylineAlgorithm.Comparison.Benchmarks/PolylineEncoderBenchmark.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class PolylineEncoderBenchmark {
5252
/// <summary>
5353
/// The polyline encoder instance.
5454
/// </summary>
55-
public DefaultPolylineEncoder PolylineAlgorithm = new();
55+
public PolylineEncoder PolylineAlgorithm = new();
5656

5757
public PolylineEncoding Cloudikka = new();
5858

src/PolylineAlgorithm/Abstraction/IPolylineDecoder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ namespace PolylineAlgorithm.Abstraction;
1010
/// <summary>
1111
/// Defines a method to decode an encoded polyline into a set of coordinates.
1212
/// </summary>
13-
public interface IPolylineDecoder<TCoordinate> {
13+
public interface IPolylineDecoder {
1414
/// <summary>
1515
/// Converts an encoded polyline to a set of coordinates.
1616
/// </summary>
1717
/// <param name="polyline">An encoded polyline to decode.</param>
1818
/// <returns>A set of coordinates represented by the encoded polyline.</returns>
19-
IEnumerable<TCoordinate> Decode(Polyline polyline);
19+
IEnumerable<Coordinate> Decode(Polyline polyline);
2020
}

src/PolylineAlgorithm/Abstraction/IPolylineEncoder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ namespace PolylineAlgorithm.Abstraction;
1010
/// <summary>
1111
/// Defines a method to encode a set of coordinates into an encoded polyline.
1212
/// </summary>
13-
public interface IPolylineEncoder<TCoordinate> {
13+
public interface IPolylineEncoder {
1414
/// <summary>
1515
/// Converts a set of coordinates to an encoded polyline.
1616
/// </summary>
1717
/// <param name="coordinates">A set of coordinates to encode.</param>
1818
/// <returns>An encoded polyline representing the set of coordinates.</returns>
19-
Polyline Encode(IEnumerable<TCoordinate> coordinates);
19+
Polyline Encode(IEnumerable<Coordinate> coordinates);
2020
}

src/PolylineAlgorithm/DefaultPolylineDecoder.cs

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/PolylineAlgorithm/DefaultPolylineEncoder.cs

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/PolylineAlgorithm/Extensions/PolylineDecoderExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
using System.Collections.Generic;
66

77
public static class PolylineDecoderExtensions {
8-
public static IEnumerable<TCoordinate> Decode<TCoordinate>(this IPolylineDecoder<TCoordinate> decoder, string polyline) {
8+
public static IEnumerable<Coordinate> Decode(this IPolylineDecoder decoder, string polyline) {
99
if (decoder is null) {
1010
throw new ArgumentNullException(nameof(decoder));
1111
}
1212

1313
return decoder.Decode(Polyline.FromString(polyline));
1414
}
1515

16-
public static IEnumerable<TCoordinate> Decode<TCoordinate>(this IPolylineDecoder<TCoordinate> decoder, char[] polyline) {
16+
public static IEnumerable<Coordinate> Decode(this IPolylineDecoder decoder, char[] polyline) {
1717
if (decoder is null) {
1818
throw new ArgumentNullException(nameof(decoder));
1919
}

0 commit comments

Comments
 (0)