A .NET port of Twitter Snowflake ID generation algorithm.
文章推薦指數: 80 %
移植 Snowflake 的 ID 生成算法。
有关该算法的详情,请参阅. /// https://github.com/twitter/snowflake/tree/snowflake-2010。
/// .
Skiptocontent
Allgists
BacktoGitHub
Signin
Signup
Sign in
Sign up
{{message}}
Instantlysharecode,notes,andsnippets.
cheer-cheer/IdWorker.cs
LastactiveAug2,2016
Star
0
Fork
0
Star
Code
Revisions
2
Embed
Whatwouldyouliketodo?
Embed
Embedthisgistinyourwebsite.
Share
Copysharablelinkforthisgist.
Clonevia
HTTPS
ClonewithGitorcheckoutwithSVNusingtherepository’swebaddress.
LearnmoreaboutcloneURLs
DownloadZIP
A.NETportofTwitterSnowflakeIDgenerationalgorithm.
Raw
IdWorker.cs
ThisfilecontainsbidirectionalUnicodetextthatmaybeinterpretedorcompileddifferentlythanwhatappearsbelow.Toreview,openthefileinaneditorthatrevealshiddenUnicodecharacters.
LearnmoreaboutbidirectionalUnicodecharacters
Showhiddencharacters
usingSystem;
usingMicrosoft.Extensions.DependencyInjection;
usingMicrosoft.Extensions.DependencyInjection.Extensions;
namespaceCheer.Gists.Utilities
{
publicinterfaceIIdWorker
{
longGetId(stringuserAgent=null);
}
///
有关该算法的详情,请参阅
///https://github.com/twitter/snowflake/tree/snowflake-2010。
///
延伸文章資訊
- 1A .NET port of Twitter Snowflake ID generation algorithm.
移植 Snowflake 的 ID 生成算法。有关该算法的详情,请参阅. /// https://github.com/twitter/snowflake/tree/snowflake-2010...
- 2twitter-snowflake · GitHub Topics
Twitter Snowflake-alike ID generator for .Net ... A distributed id generation solution based on z...
- 3Snowflake ID - Wikipedia
- 4Generates Twitter-like Snowflake ids in Java - GitHub
Generates Twitter-like Snowflake ids. In short, this is an id scheme to generate unique 64 bit id...
- 5RobThree/IdGen: Twitter Snowflake-alike ID generator for .Net
Twitter Snowflake-alike ID generator for .Net. Contribute to RobThree/IdGen development by creati...