增加YidHelper快速使用方法
This commit is contained in:
@@ -185,6 +185,11 @@ var options = new IdGeneratorOptions()
|
||||
var newId = new YidGenerator(options).NewLong();
|
||||
```
|
||||
|
||||
#### 单机快速使用
|
||||
```
|
||||
YidHelper.NewId();
|
||||
```
|
||||
|
||||
#### options说明
|
||||
```
|
||||
public class IdGeneratorOptions
|
||||
|
||||
@@ -28,6 +28,10 @@ namespace Yitter.IdGenerator
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置参数,建议程序初始化时执行一次
|
||||
/// </summary>
|
||||
/// <param name="options"></param>
|
||||
public static void SetIdGenerator(IdGeneratorOptions options)
|
||||
{
|
||||
_IdGenInstance = new YidGenerator(options);
|
||||
|
||||
Reference in New Issue
Block a user