Skip to content

Commit

Permalink
Added dependency on ThreadSafeRandomizer.
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCiliaVincenti committed Mar 13, 2022
1 parent ce96a0d commit 5fe531b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 30 deletions.
4 changes: 2 additions & 2 deletions ListShuffle/ListExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using ThreadSafeRandomizer;

namespace ListShuffle
{
Expand All @@ -21,7 +21,7 @@ public static void Shuffle<T>(this IList<T> list)
while (n > 1)
{
n--;
int k = ThreadSafeRandom.Next(n + 1);
int k = ThreadSafeRandom.Instance.Next(n + 1);
(list[n], list[k]) = (list[k], list[n]);
}
}
Expand Down
12 changes: 8 additions & 4 deletions ListShuffle/ListShuffle.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
<RepositoryUrl>https://github.com/MarkCiliaVincenti/ListShuffle.git</RepositoryUrl>
<PackageProjectUrl>https://github.com/MarkCiliaVincenti/ListShuffle</PackageProjectUrl>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Version>1.0.4</Version>
<Version>1.0.5</Version>
<PackageIcon>logo.png</PackageIcon>
<PackageReleaseNotes>Updated documentation and tests packages.</PackageReleaseNotes>
<PackageReleaseNotes>Added dependency on ThreadSafeRandomizer.</PackageReleaseNotes>
<Description>Thread-safe list shuffle extension library, using Fisher-Yates shuffle.</Description>
<Copyright>© 2022 Mark Cilia Vincenti</Copyright>
<PackageTags>list,shuffle,shuffler,extension,threadsafe,thread-safe</PackageTags>
<RepositoryType>git</RepositoryType>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<AssemblyVersion>1.0.4.0</AssemblyVersion>
<FileVersion>1.0.4.0</FileVersion>
<AssemblyVersion>1.0.5.0</AssemblyVersion>
<FileVersion>1.0.5.0</FileVersion>
<PackageReadmeFile>README.md</PackageReadmeFile>
<IsPackable>true</IsPackable>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
Expand Down Expand Up @@ -43,4 +43,8 @@
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="ThreadSafeRandomizer" Version="1.0.2" />
</ItemGroup>

</Project>
24 changes: 0 additions & 24 deletions ListShuffle/ThreadSafeRandom.cs

This file was deleted.

0 comments on commit 5fe531b

Please sign in to comment.