Korjn.Utilities
9.0.1
dotnet add package Korjn.Utilities --version 9.0.1
NuGet\Install-Package Korjn.Utilities -Version 9.0.1
<PackageReference Include="Korjn.Utilities" Version="9.0.1" />
<PackageVersion Include="Korjn.Utilities" Version="9.0.1" />
<PackageReference Include="Korjn.Utilities" />
paket add Korjn.Utilities --version 9.0.1
#r "nuget: Korjn.Utilities, 9.0.1"
#addin nuget:?package=Korjn.Utilities&version=9.0.1
#tool nuget:?package=Korjn.Utilities&version=9.0.1
Korjn.Utilities
Korjn.Utilities is a utility library for .NET, providing lightweight helper tools, including a high-performance unique ID generator.
📦 Installation
Install the package from NuGet:
dotnet add package Korjn.Utilities
or via the NuGet Package Manager:
Install-Package Korjn.Utilities
📝 Usage example
using Korjn.Utilities;
string uniqueId = IdGenerator.NewId();
Console.WriteLine($"Generated ID: {uniqueId}");
🔍 About IdGenerator IdGenerator generates a unique 22-character base32 string identifier:
✅ Guaranteed uniqueness across machines ✅ Guaranteed uniqueness across processes on the same machine ✅ Guaranteed uniqueness across threads within a process ✅ Supports up to 16 million IDs per second per process ✅ Lock-free implementation (thread-safe without locking)
The ID is constructed from the following components:
timestamp (32 bits) — current Unix timestamp in seconds
machineId (32 bits) — unique machine identifier (hash of hostname)
pid (16 bits) — current process ID
increment (24 bits) — atomic increment counter
randomExtra (8 bits) — random byte generated once per process start
All combined into a 112-bit number encoded in base32 (22 characters).
📚 License This project is licensed under the MIT License. See LICENSE for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.