1
0
mirror of synced 2025-12-09 22:58:19 +08:00

增加YidHelper快速使用方法

This commit is contained in:
zhouzj
2021-03-12 13:52:43 +08:00
parent 0f388ffcfc
commit 099db1bb94
2 changed files with 9 additions and 0 deletions

View File

@@ -185,6 +185,11 @@ var options = new IdGeneratorOptions()
var newId = new YidGenerator(options).NewLong();
```
#### 单机快速使用
```
YidHelper.NewId();
```
#### options说明
```
public class IdGeneratorOptions

View File

@@ -28,6 +28,10 @@ namespace Yitter.IdGenerator
}
}
/// <summary>
/// 设置参数,建议程序初始化时执行一次
/// </summary>
/// <param name="options"></param>
public static void SetIdGenerator(IdGeneratorOptions options)
{
_IdGenInstance = new YidGenerator(options);