Snowflake.CSharp

Twitter的雪花算法SnowFlake,使用csharp语言实现。


Keywords
snowflake, twitter
License
Apache-2.0
Install
Install-Package Snowflake.CSharp -Version 1.1.0

Documentation

An ID Generator for C# based on Snowflake Algorithm (Twitter announced).

nuget NETCore stats LICENSE

Description

Language: English | 中文

Twitter's SnowFlake algorithm is implemented using C# language.

Installation

PM> Install-Package Snowflake.CSharp

Useage

  1. Specify the data center ID and machine ID.
SnowFlake snowFlake=new SnowFlake(datacenterId:1,machineId:1);
  1. Generate Id.
var id=snowFlake.NextId();

License

Apache