var worker = new IdWorker(1, 1);
long id = worker.NextId();
IdWorker
should be instantiated once.Otherwise,there will be repeat.
A port of Twitter's Snowflake algorithm to C#.
Snowflake is a service for generating unique ID numbers at high scale.
Apache 2.0