Skip to content

Commit 48d11b2

Browse files
author
Petr Sramek
committed
applied file header rule
1 parent 947e656 commit 48d11b2

32 files changed

+32
-88
lines changed

benchmarks/PolylineAlgorithm.Benchmarks/PolylineDecoderBenchmark.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,4 @@ public void PolylineDecoder_Decode_FromMemory() {
8383
.Decode(in polyline)
8484
.Consume(_consumer);
8585
}
86-
}
86+
}

benchmarks/PolylineAlgorithm.Benchmarks/PolylineEncoderBenchmark.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ public Polyline PolylineEncoder_Encode_List() {
5959
public Polyline PolylineEncoder_Encode_Enumerator() {
6060
return Encoder.Encode(Enumeration!);
6161
}
62-
}
62+
}

benchmarks/PolylineAlgorithm.Benchmarks/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ static void Main(string[] args) {
2121
.FromAssembly(typeof(Program).Assembly)
2222
.Run(args, DefaultConfig.Instance);
2323
}
24-
}
24+
}

src/PolylineAlgorithm/Coordinate.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,4 @@ public bool Equals(Coordinate other) {
131131
}
132132

133133
#endregion
134-
}
134+
}

src/PolylineAlgorithm/IPolylineDecoder.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,4 @@ public interface IPolylineDecoder {
1717
/// <param name="polyline">An encoded polyline to decode.</param>
1818
/// <returns>A set of coordinates represented by the encoded polyline.</returns>
1919
IEnumerable<Coordinate> Decode(ref readonly Polyline polyline);
20-
}
21-
20+
}

src/PolylineAlgorithm/IPolylineEncoder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ public interface IPolylineEncoder {
1717
/// <param name="coordinates">A set of coordinates to encode.</param>
1818
/// <returns>An encoded polyline representing the set of coordinates.</returns>
1919
Polyline Encode(IEnumerable<Coordinate> coordinates);
20-
}
20+
}

src/PolylineAlgorithm/Internal/Defaults.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,4 @@ public static class Range {
9292
public static readonly CoordinateRange Longitude = new(Coordinate.Longitude.Min, Coordinate.Longitude.Max);
9393
}
9494
}
95-
}
95+
}

src/PolylineAlgorithm/Internal/PolylineReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,4 +150,4 @@ public ReaderState() {
150150
/// </summary>
151151
public int Longitude { get; set; }
152152
}
153-
}
153+
}

src/PolylineAlgorithm/Internal/PolylineWriter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,4 +147,4 @@ public WriterState() {
147147
/// </summary>
148148
public int Longitude { get; set; }
149149
}
150-
}
150+
}

src/PolylineAlgorithm/InvalidCoordinateException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ internal static void ThrowIfNotValid(Coordinate coordinate) {
4343

4444
throw new InvalidCoordinateException(coordinate, string.Format(ExceptionMessageResource.CoordinateIsOutOfRangeMessageFormat, coordinate.Latitude, coordinate.Longitude));
4545
}
46-
}
46+
}

src/PolylineAlgorithm/InvalidPolylineException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ private InvalidPolylineException(string message)
3232
internal static void Throw(int position) {
3333
throw new InvalidPolylineException(string.Format(ExceptionMessageResource.PolylineStringIsMalformedMessage, position));
3434
}
35-
}
35+
}

src/PolylineAlgorithm/InvalidReaderStateException.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,4 @@ internal static void ThrowIfCannotRead(bool canRead, int readerPosition, int pol
4444
throw new InvalidReaderStateException(string.Format(ExceptionMessageResource.UnableToReadPolylineAtPositionMessageFormat, readerPosition, polylineLength));
4545
}
4646
}
47-
}
48-
47+
}

src/PolylineAlgorithm/InvalidWriterStateException.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,4 @@ internal static void ThrowIfCannotWrite(bool canWrite, int writerPosition, int b
4444
throw new InvalidWriterStateException(string.Format(ExceptionMessageResource.UnableToWritePolylineBufferAtPositionMessageFormat, writerPosition, bufferSize));
4545
}
4646
}
47-
}
48-
47+
}

src/PolylineAlgorithm/Polyline.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,5 +178,4 @@ public Polyline(ReadOnlyMemory<char> value) {
178178
public static explicit operator Polyline(string polyline) => FromString(polyline);
179179

180180
#endregion
181-
}
182-
181+
}

src/PolylineAlgorithm/PolylineEncoder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ public Polyline Encode(IEnumerable<Coordinate> coordinates) {
5757
_ => coordinates.Count(),
5858
};
5959
}
60-
}
60+
}

src/PolylineAlgorithm/Validation/CoordinateRange.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,4 @@ public override int GetHashCode() {
107107
public static bool operator !=(CoordinateRange left, CoordinateRange right) {
108108
return !(left == right);
109109
}
110-
}
110+
}

src/PolylineAlgorithm/Validation/CoordinateValidator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ public bool IsValid(Coordinate coordinate) {
2929
Latitude.IsInRange(coordinate.Latitude)
3030
&& Longitude.IsInRange(coordinate.Longitude);
3131
}
32-
}
32+
}

src/PolylineAlgorithm/Validation/ICoordinateValidator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ public interface ICoordinateValidator {
3232
/// Gets the default coordinate validator instance.
3333
/// </summary>
3434
internal static ICoordinateValidator Default { get; } = new CoordinateValidator(Defaults.Coordinate.Range.Latitude, Defaults.Coordinate.Range.Longitude);
35-
}
35+
}

tests/PolylineAlgorithm.Tests/CoordinateTest.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,4 @@ public void Equals_Coordinate_False(double latitude, double longitude) {
134134
// Assert
135135
Assert.IsFalse(result);
136136
}
137-
}
138-
139-
140-
137+
}

tests/PolylineAlgorithm.Tests/Data/Values.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,4 @@ public static class InvalidWriterStateException {
218218
/// </summary>
219219
public static readonly int Length = Position;
220220
}
221-
}
222-
223-
224-
221+
}

tests/PolylineAlgorithm.Tests/Internal/PolylineReaderTest.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,4 @@ static void Read(string value) {
153153
// Assert
154154
Assert.ThrowsExactly<InvalidPolylineException>(() => Read(value));
155155
}
156-
}
157-
158-
159-
156+
}

tests/PolylineAlgorithm.Tests/Internal/PolylineWriterTest.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,4 @@ static void Write(Coordinate coordinate, int bufferSize) {
141141
// Assert
142142
Assert.ThrowsExactly<InvalidWriterStateException>(() => Write(coordinate, bufferSize));
143143
}
144-
}
145-
146-
147-
144+
}

tests/PolylineAlgorithm.Tests/InvalidCoordinateExceptionTest.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,4 @@ static void ThrowIfNotValid(Coordinate coordinate) {
4949
Assert.AreEqual(coordinate, exception.Coordinate);
5050
Assert.IsFalse(string.IsNullOrWhiteSpace(exception.Message));
5151
}
52-
}
53-
54-
55-
56-
52+
}

tests/PolylineAlgorithm.Tests/InvalidPolylineExceptionTest.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,4 @@ public void Throw_Method_Invalid_Coordinate_Parameter_PolylineMalformedException
2727
var exception = Assert.ThrowsExactly<InvalidPolylineException>(() => Throw(position));
2828
Assert.IsFalse(string.IsNullOrWhiteSpace(exception.Message));
2929
}
30-
}
31-
32-
33-
34-
30+
}

tests/PolylineAlgorithm.Tests/InvalidReaderStateExceptionTest.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,4 @@ public void ThrowIfCannotRead_Method_False_Random_Random_Parameter_InvalidReader
4646
var exception = Assert.ThrowsExactly<InvalidReaderStateException>(() => Throw(canRead, position, length));
4747
Assert.IsFalse(string.IsNullOrWhiteSpace(exception.Message));
4848
}
49-
}
50-
51-
52-
53-
54-
49+
}

tests/PolylineAlgorithm.Tests/InvalidWriterStateExceptionTest.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,4 @@ public void ThrowIfCannotWrite_Method_False_Random_Random_Parameter_InvalidWrite
4646
var exception = Assert.ThrowsExactly<InvalidWriterStateException>(() => Throw(canWrite, position, length));
4747
Assert.IsFalse(string.IsNullOrWhiteSpace(exception.Message));
4848
}
49-
}
50-
51-
52-
53-
54-
49+
}

tests/PolylineAlgorithm.Tests/PolylineDecoderTest.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,4 @@ public void Decode_Valid_Input_Ok() {
6363
// Assert
6464
CollectionAssert.AreEqual(Values.Coordinates.Valid.ToArray(), result.ToArray());
6565
}
66-
}
67-
68-
69-
70-
71-
66+
}

tests/PolylineAlgorithm.Tests/PolylineEncoderTest.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,4 @@ public void Encode_ValidInput_Ok() {
8383
// Assert
8484
Assert.AreEqual(Values.Polyline.Valid, result.ToString());
8585
}
86-
}
87-
88-
89-
90-
91-
86+
}

tests/PolylineAlgorithm.Tests/PolylineTest.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,4 @@ public void AsMemory_Equals_Constructor_Parameter(string value) {
239239
// Assert
240240
Assert.AreEqual(expected, result);
241241
}
242-
}
243-
244-
245-
246-
247-
248-
242+
}

tests/PolylineAlgorithm.Tests/Properties/Category.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,4 @@ internal static class Category {
1313
/// Represents the unit test category.
1414
/// </summary>
1515
public const string Unit = nameof(Unit);
16-
}
17-
18-
16+
}

tests/PolylineAlgorithm.Tests/Validation/CoordinateRangeTest.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,4 @@ public void Equals_CoordinateRange_False(double min, double max) {
125125
// Assert
126126
Assert.IsFalse(result);
127127
}
128-
}
129-
130-
128+
}

tests/PolylineAlgorithm.Tests/Validation/CoordinateValidatorTest.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,4 @@ static void New(double min, double max) {
6363
// Assert
6464
Assert.ThrowsExactly<ArgumentOutOfRangeException>(() => New(min, max));
6565
}
66-
}
67-
68-
66+
}

0 commit comments

Comments
 (0)