增加YidHelper快速使用方法
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user