Korjn.Utilities 9.0.1

dotnet add package Korjn.Utilities --version 9.0.1
                    
NuGet\Install-Package Korjn.Utilities -Version 9.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Korjn.Utilities" Version="9.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Korjn.Utilities" Version="9.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Korjn.Utilities" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Korjn.Utilities --version 9.0.1
                    
#r "nuget: Korjn.Utilities, 9.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Korjn.Utilities&version=9.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Korjn.Utilities&version=9.0.1
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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.

Version Downloads Last Updated
9.0.1 139 5/1/2025
9.0.0 141 5/1/2025