forked from ccollie/snowflake-net
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
19 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
namespace Demo | ||
using Snowflake.Net; | ||
using System; | ||
|
||
namespace Demo | ||
{ | ||
class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
|
||
var worker = new IdWorker(1, 1); | ||
long id = worker.NextId(); | ||
Console.WriteLine($"生成的ID为:{id},他的长度是:{id.ToString().Length}"); | ||
Console.ReadKey(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Snowflake.Net" version="4.0.0" targetFramework="net451" /> | ||
</packages> |