diff --git a/README.md b/README.md index a64c820..a6eb4bb 100644 --- a/README.md +++ b/README.md @@ -185,6 +185,11 @@ var options = new IdGeneratorOptions() var newId = new YidGenerator(options).NewLong(); ``` +#### 单机快速使用 +``` +YidHelper.NewId(); +``` + #### options说明 ``` public class IdGeneratorOptions diff --git a/src/Yitter.IdGenerator/YidHelper.cs b/src/Yitter.IdGenerator/YidHelper.cs index 15b488b..630ebd0 100644 --- a/src/Yitter.IdGenerator/YidHelper.cs +++ b/src/Yitter.IdGenerator/YidHelper.cs @@ -28,6 +28,10 @@ namespace Yitter.IdGenerator } } + /// + /// 设置参数,建议程序初始化时执行一次 + /// + /// public static void SetIdGenerator(IdGeneratorOptions options) { _IdGenInstance = new YidGenerator(options);