Hexalith.Commons.UniqueIds
1.64.0
See the version list below for details.
dotnet add package Hexalith.Commons.UniqueIds --version 1.64.0
NuGet\Install-Package Hexalith.Commons.UniqueIds -Version 1.64.0
<PackageReference Include="Hexalith.Commons.UniqueIds" Version="1.64.0" />
<PackageVersion Include="Hexalith.Commons.UniqueIds" Version="1.64.0" />
<PackageReference Include="Hexalith.Commons.UniqueIds" />
paket add Hexalith.Commons.UniqueIds --version 1.64.0
#r "nuget: Hexalith.Commons.UniqueIds, 1.64.0"
#addin nuget:?package=Hexalith.Commons.UniqueIds&version=1.64.0
#tool nuget:?package=Hexalith.Commons.UniqueIds&version=1.64.0
Hexalith.Commons.UniqueIds
A lightweight C# library for generating unique identifiers in various formats. Part of the Hexalith framework.
Features
- Date/Time-based IDs: Generate unique 17-character IDs based on the current UTC time
- GUID-based IDs: Generate unique 22-character Base64 URL-safe IDs
Installation
dotnet add package Hexalith.Commons.UniqueIds
Usage
using Hexalith.Commons.UniqueIds;
// Generate a unique ID based on current UTC date/time (format: yyyyMMddHHmmssfff)
string dateTimeId = UniqueIdHelper.GenerateDateTimeId();
// Example: "20240401152237385"
// Generate a unique 22-character ID based on a GUID
string uniqueId = UniqueIdHelper.GenerateUniqueStringId();
// Example: "gZOW2EgVrEq5SBJLegYcVA"
Details
GenerateDateTimeId()
Generates a unique 17-character ID based on UTC date/time with format "yyyyMMddHHmmssfff". This method ensures uniqueness even when called multiple times within the same millisecond by incrementing the time if necessary.
Caution : Only one ID can be generated per millisecond.
GenerateUniqueStringId()
Generates a unique 22-character ID string derived from a GUID encoded in Base64 URL-safe format. This produces shorter, URL-friendly unique identifiers compared to standard GUIDs.
Github Project
Hexalith.Commons - A comprehensive .NET utility library providing common functionality for Hexalith projects.
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 (4)
Showing the top 4 NuGet packages that depend on Hexalith.Commons.UniqueIds:
Package | Downloads |
---|---|
Hexalith.KeyValueStorages
Hexalith KeyValueStorages utilities and helpers |
|
Hexalith.KeyValueStorages.Files
Hexalith KeyValueStorages utilities and helpers |
|
Hexalith.KeyValueStorages.DaprComponents
Hexalith KeyValueStorages utilities and helpers |
|
Hexalith.Commons.Metadatas
Hexalith is a set of libraries to build an application with micro-service architecture. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.0.1 | 249 | 6/13/2025 |
2.0.0 | 249 | 6/13/2025 |
1.66.5 | 118 | 4/11/2025 |
1.66.4 | 198 | 4/10/2025 |
1.66.3 | 272 | 4/9/2025 |
1.66.2 | 216 | 4/8/2025 |
1.66.1 | 160 | 4/8/2025 |
1.66.0 | 159 | 4/7/2025 |
1.65.1 | 297 | 4/6/2025 |
1.65.0 | 148 | 4/6/2025 |
1.64.0 | 178 | 4/2/2025 |
1.63.1 | 153 | 4/2/2025 |
1.63.0 | 151 | 4/2/2025 |
1.0.0 | 144 | 4/2/2025 |