Skip to content

Commit cd11207

Browse files
committed
Bump version to 5.11.3; update formatting in Pairs and MathExtensions for consistency; add Microsoft.Testing.Extensions.CodeCoverage package to test project.
1 parent e1f3636 commit cd11207

8 files changed

Lines changed: 22 additions & 21 deletions

File tree

DotNetExtensions/Collections/MathExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public partial class EnumerableExtensions
1717
public T Product()
1818
{
1919
ArgumentNullException.ThrowIfNull(source);
20-
20+
2121
using var e = source.GetEnumerator();
2222
if (!e.MoveNext())
2323
throw new InvalidOperationException("Sequence contains no elements.");
@@ -91,7 +91,7 @@ public T Or()
9191
public T Xor()
9292
{
9393
ArgumentNullException.ThrowIfNull(source);
94-
94+
9595
using var e = source.GetEnumerator();
9696
if (!e.MoveNext())
9797
throw new InvalidOperationException("Sequence contains no elements.");

DotNetExtensions/Collections/Pairs.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,20 @@ public static partial class EnumerableExtensions
2121
switch (source)
2222
{
2323
case IList<T> list:
24-
{
25-
return PairsInternal(list);
26-
}
24+
{
25+
return PairsInternal(list);
26+
}
2727
case ICollection<T> coll:
28-
{
29-
var array = new T[coll.Count];
30-
coll.CopyTo(array, 0);
31-
return PairsInternal(array);
32-
}
28+
{
29+
var array = new T[coll.Count];
30+
coll.CopyTo(array, 0);
31+
return PairsInternal(array);
32+
}
3333
default:
34-
{
35-
var buffered = source.ToList();
36-
return PairsInternal(buffered);
37-
}
34+
{
35+
var buffered = source.ToList();
36+
return PairsInternal(buffered);
37+
}
3838
}
3939
}
4040

DotNetExtensions/Collections/SkipAt.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace DotNetExtensions.Collections;
1+
namespace DotNetExtensions.Collections;
22

33
public static partial class EnumerableExtensions
44
{

DotNetExtensions/DotNetExtensions.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</PropertyGroup>
1414

1515
<PropertyGroup>
16-
<Version>5.11.2</Version>
16+
<Version>5.11.3</Version>
1717
<Authors>Diogo Medeiros</Authors>
1818
<Company>Diogo Medeiros</Company>
1919
<Description>This is a collection of extension methods for .NET Core.</Description>

DotNetExtensionsTests/Collections/MathExtensionsTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public void Product_SourceIsEmpty_ThrowsInvalidOperationException()
2525
int[] source = [];
2626
Assert.ThrowsExactly<InvalidOperationException>(() => source.Product());
2727
}
28-
28+
2929
[TestMethod]
3030
public void And_SourceHasMultipleElements_ReturnsCorrectAnd()
3131
{
@@ -41,7 +41,7 @@ public void And_SourceHasOneElement_ReturnsThatElement()
4141
var result = source.And();
4242
Assert.AreEqual(7, result);
4343
}
44-
44+
4545
[TestMethod]
4646
public void And_SourceIsEmpty_ThrowsInvalidOperationException()
4747
{

DotNetExtensionsTests/Core/PointExtensionsTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ public void GetCorners_WithOrigin_ReturnsExpectedCorners()
2323
{
2424
var point = new Point(0, 0);
2525
var (topLeft, topRight, bottomLeft, bottomRight) = point.GetCorners();
26-
26+
2727
Assert.AreEqual(new Point(-1, -1), topLeft);
2828
Assert.AreEqual(new Point(1, -1), topRight);
2929
Assert.AreEqual(new Point(-1, 1), bottomLeft);
3030
Assert.AreEqual(new Point(1, 1), bottomRight);
3131
}
32-
32+
3333
[TestMethod]
3434
public void ManhattanDistance_WithPositiveCoordinates_ReturnsExpectedDistance()
3535
{

DotNetExtensionsTests/DotNetExtensionsTests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
<ItemGroup>
2121
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
22+
<PackageReference Update="Microsoft.Testing.Extensions.CodeCoverage" Version="18.3.2" />
2223
</ItemGroup>
2324

2425
</Project>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[assembly: Parallelize(Scope = ExecutionScope.MethodLevel)]
1+
[assembly: Parallelize(Scope = ExecutionScope.MethodLevel)]

0 commit comments

Comments
 (0)