From 099db1bb944dc78cec0f8498804af9b026d345d1 Mon Sep 17 00:00:00 2001 From: zhouzj Date: Fri, 12 Mar 2021 13:52:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0YidHelper=E5=BF=AB=E9=80=9F?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +++++ src/Yitter.IdGenerator/YidHelper.cs | 4 ++++ 2 files changed, 9 insertions(+) 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);