Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions csharp/Platform.Random/Platform.Random.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Description>LinksPlatform's Platform.Random Class Library</Description>
<Copyright>Konstantin Diachenko</Copyright>
<AssemblyTitle>Platform.Random</AssemblyTitle>
<VersionPrefix>0.3.0</VersionPrefix>
<VersionPrefix>0.4.0</VersionPrefix>
<Authors>Konstantin Diachenko</Authors>
<TargetFramework>net8</TargetFramework>
<AssemblyName>Platform.Random</AssemblyName>
Expand All @@ -23,7 +23,7 @@
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<LangVersion>latest</LangVersion>
<PackageReleaseNotes>Update target framework from net7 to net8.</PackageReleaseNotes>
<PackageReleaseNotes>Replace custom Random instance with Random.Shared from .NET 6+ for improved thread safety and performance.</PackageReleaseNotes>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down
6 changes: 3 additions & 3 deletions csharp/Platform.Random/RandomHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ namespace Platform.Random
public static class RandomHelpers
{
/// <summary>
/// <para>Returns the pseudorandom number generator that is using the time of the first access to this field as seed.</para>
/// <para>Возвращает генератор псевдослучайных чисел использующий в качестве seed время первого обращения к этому полю.</para>
/// <para>Returns the shared, thread-safe pseudorandom number generator from .NET 6+.</para>
/// <para>Возвращает разделяемый, потокобезопасный генератор псевдослучайных чисел из .NET 6+.</para>
/// </summary>
public static readonly System.Random Default = new System.Random(System.DateTime.UtcNow.Ticks.GetHashCode());
public static System.Random Default => System.Random.Shared;
}
}
Loading