Ksuid 1.0.0
dotnet add package Ksuid --version 1.0.0
NuGet\Install-Package Ksuid -Version 1.0.0
<PackageReference Include="Ksuid" Version="1.0.0" />
paket add Ksuid --version 1.0.0
#r "nuget: Ksuid, 1.0.0"
// Install Ksuid as a Cake Addin #addin nuget:?package=Ksuid&version=1.0.0 // Install Ksuid as a Cake Tool #tool nuget:?package=Ksuid&version=1.0.0
Ksuid
This library implements the K-Sortable Globally Unique IDs from Segment. See also the article called A Brief History of the UUID.
KSUID is for K-Sortable Unique IDentifier. It's a way to generate globally unique IDs similar to RFC 4122 UUIDs, but contain a time component so they can be "roughly" sorted by time of creation. The remainder of the KSUID is randomly generated bytes.
Installation
To install Ksuid, run the following command in the Package Manager Console
PM> Install-Package Ksuid
Usage
using KSUID;
var ksuid1 = Ksuid.Generate(); // same as new Ksuid()
Console.WriteLine(ksuid1);
Console.WriteLine(ksuid1.GetTimestamp());
Console.WriteLine(ksuid1.GetUnixTimestamp());
var ksuid2 = Ksuid.FromString("0o5Fs0EELR0fUjHjbCnEtdUwQe3");
Console.WriteLine(ksuid2);
Console.WriteLine(ksuid2.GetTimestamp());
Console.WriteLine(ksuid2.GetUnixTimestamp());
var ksuid3 = new Ksuid(ksuid2.GetPayload());
Console.WriteLine(ksuid3);
Console.WriteLine(ksuid3.GetTimestamp());
Console.WriteLine(ksuid3.GetUnixTimestamp());
var ksuid4 = new Ksuid(ksuid2.GetPayload(), ksuid1.GetTimestamp());
Console.WriteLine(ksuid4);
Console.WriteLine(ksuid4.GetTimestamp());
Console.WriteLine(ksuid4.GetUnixTimestamp());
var ksuid4 = Ksuid.FromByteArray(ksuid2.ToByteArray());
Console.WriteLine(ksuid4);
License
The MIT License
More info see LICENSE
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Base62-Net (>= 1.2.157201)
- JetBrains.Annotations (>= 2021.3.0)
- System.Runtime.Extensions (>= 4.3.1)
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 |
---|---|---|
1.0.0 | 548,077 | 4/7/2022 |
1.0.0-build4 | 67,169 | 4/9/2018 |
1.0.0-build3 | 877 | 4/8/2018 |