提交 13cdd1ce 编写于 作者: Z zhouzj

增加YidHelper快速使用方法

上级 7edc7f57
......@@ -53,7 +53,7 @@ namespace Yitter.OrgSystem.TestA
IdGeneratorOptions options1 = (newConfig);
if (IdGen == null)
{
IdGen = new YitIdGenerator(options1);
IdGen = new YidGenerator(options1);
}
if (outputLog)
......@@ -99,7 +99,7 @@ namespace Yitter.OrgSystem.TestA
};
Console.WriteLine("Gen:" + i);
var idGen2 = new YitIdGenerator(options);
var idGen2 = new YidGenerator(options);
var test = new GenTest(idGen2, genIdCount, i);
if (outputLog)
......
......@@ -14,7 +14,7 @@ using System.Text;
namespace Yitter.IdGenerator
{
/// <summary>
/// 这是一个调用的例子,默认情况下,集成者可以直接使用 NewId()。
/// 这是一个调用的例子,默认情况下,单机集成者可以直接使用 NewId()。
/// </summary>
public class YidHelper
{
......@@ -30,7 +30,7 @@ namespace Yitter.IdGenerator
public static void SetIdGenerator(IdGeneratorOptions options)
{
_IdGenInstance = new YitIdGenerator(options);
_IdGenInstance = new YidGenerator(options);
}
/// <summary>
......@@ -43,7 +43,7 @@ namespace Yitter.IdGenerator
{
if (_IdGenInstance == null)
{
_IdGenInstance = new YitIdGenerator(new IdGeneratorOptions() { WorkerId = 1 });
_IdGenInstance = new YidGenerator(new IdGeneratorOptions() { WorkerId = 1 });
}
return _IdGenInstance.NewLong();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册