Skip to content

Commit 3eb200c

Browse files
Code cleaning.
1 parent c4ef8d6 commit 3eb200c

File tree

6 files changed

+16
-12
lines changed

6 files changed

+16
-12
lines changed

ListShuffle.Tests.Net50/Tests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public void TestConcurrency()
3232
{
3333
int totalFives = 0;
3434

35-
var result = Parallel.For(1, 100001, (i, state) =>
35+
var result = Parallel.For(1, 100001, (_, _) =>
3636
{
3737
var list = new List<int>();
3838
for (int j = 1; j <= 10; j++)
@@ -75,7 +75,7 @@ public void TestConcurrencyCryptoStrong()
7575
{
7676
int totalFives = 0;
7777

78-
var result = Parallel.For(1, 100001, (i, state) =>
78+
var result = Parallel.For(1, 100001, (_, _) =>
7979
{
8080
var list = new List<int>();
8181
for (int j = 1; j <= 10; j++)

ListShuffle.Tests.Net60/Tests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public void TestConcurrency()
3232
{
3333
int totalFives = 0;
3434

35-
var result = Parallel.For(1, 100001, (i, state) =>
35+
var result = Parallel.For(1, 100001, (_, _) =>
3636
{
3737
var list = new List<int>();
3838
for (int j = 1; j <= 10; j++)
@@ -75,7 +75,7 @@ public void TestConcurrencyCryptoStrong()
7575
{
7676
int totalFives = 0;
7777

78-
var result = Parallel.For(1, 100001, (i, state) =>
78+
var result = Parallel.For(1, 100001, (_, _) =>
7979
{
8080
var list = new List<int>();
8181
for (int j = 1; j <= 10; j++)

ListShuffle.Tests.NetFramework/ListShuffle.Tests.NetFramework.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>net48</TargetFramework>
5-
5+
<LangVersion>9.0</LangVersion>
66
<IsPackable>false</IsPackable>
77
</PropertyGroup>
88

ListShuffle.Tests.NetFramework/Tests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public void TestConcurrencyCryptoStrongNetFramework()
3232
{
3333
int totalFives = 0;
3434

35-
var result = Parallel.For(1, 100001, (i, state) =>
35+
var result = Parallel.For(1, 100001, (_, _) =>
3636
{
3737
var list = new List<int>();
3838
for (int j = 1; j <= 10; j++)

ListShuffle/ListExtensions.cs

+5-2
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,13 @@ public static void Shuffle<T>(this IList<T> list)
3838
[MethodImpl(MethodImplOptions.AggressiveInlining)]
3939
public static void CryptoStrongShuffle<T>(this IList<T> list)
4040
{
41-
if (list == null) throw new ArgumentNullException(nameof(list));
41+
if (list == null)
42+
{
43+
throw new ArgumentNullException(nameof(list));
44+
}
4245
int n = list.Count;
4346
#if NETSTANDARD2_0
44-
using (var generator = RandomNumberGenerator.Create())
47+
using var generator = RandomNumberGenerator.Create();
4548
#endif
4649
while (n > 1)
4750
{

ListShuffle/ListShuffle.csproj

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,21 @@
33
<PropertyGroup>
44
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
55
<Authors>Mark Cilia Vincenti</Authors>
6+
<LangVersion>8.0</LangVersion>
67
<RepositoryUrl>https://github.com/MarkCiliaVincenti/ListShuffle.git</RepositoryUrl>
78
<PackageProjectUrl>https://github.com/MarkCiliaVincenti/ListShuffle</PackageProjectUrl>
89
<Copyright>MIT</Copyright>
910
<PackageLicenseExpression>MIT</PackageLicenseExpression>
10-
<Version>1.1.4</Version>
11+
<Version>1.1.5</Version>
1112
<PackageIcon>logo.png</PackageIcon>
12-
<PackageReleaseNotes>Enabled deterministic builds, allowing debugging of this library from your code.</PackageReleaseNotes>
13+
<PackageReleaseNotes>Code cleaning.</PackageReleaseNotes>
1314
<Description>Thread-safe list shuffle extension library, using Fisher-Yates shuffle and optional cryptographically-strong random.</Description>
1415
<Copyright>© 2023 Mark Cilia Vincenti</Copyright>
1516
<PackageTags>list,shuffle,shuffler,extension,threadsafe,thread-safe,random</PackageTags>
1617
<RepositoryType>git</RepositoryType>
1718
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
18-
<AssemblyVersion>1.1.4.0</AssemblyVersion>
19-
<FileVersion>1.1.4.0</FileVersion>
19+
<AssemblyVersion>1.1.5.0</AssemblyVersion>
20+
<FileVersion>1.1.5.0</FileVersion>
2021
<PackageReadmeFile>README.md</PackageReadmeFile>
2122
<IsPackable>true</IsPackable>
2223
<IsTrimmable>true</IsTrimmable>

0 commit comments

Comments
 (0)