Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion C#/source/Yitter.IdGenerator/Contract/ISnowWorker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace Yitter.IdGenerator
{
internal interface ISnowWorker
public interface ISnowWorker
{
//Action<OverCostActionArg> GenAction { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion C#/source/Yitter.IdGenerator/Core/SnowWorkerM1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Yitter.IdGenerator
/// <summary>
/// 雪花漂移算法
/// </summary>
internal class SnowWorkerM1 : ISnowWorker
public class SnowWorkerM1 : ISnowWorker
{
/// <summary>
/// 基础时间
Expand Down
2 changes: 1 addition & 1 deletion C#/source/Yitter.IdGenerator/Core/SnowWorkerM2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Yitter.IdGenerator
/// <summary>
/// 常规雪花算法
/// </summary>
internal class SnowWorkerM2 : SnowWorkerM1
public class SnowWorkerM2 : SnowWorkerM1
{
public SnowWorkerM2(IdGeneratorOptions options) : base(options)
{
Expand Down
2 changes: 1 addition & 1 deletion C#/source/Yitter.IdGenerator/Core/SnowWorkerM3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Yitter.IdGenerator
/// <summary>
/// 雪花漂移算法(支持数据中心ID和秒级时间戳)
/// </summary>
internal class SnowWorkerM3 : SnowWorkerM1
public class SnowWorkerM3 : SnowWorkerM1
{
/// <summary>
/// 数据中心ID(默认0)
Expand Down
4 changes: 2 additions & 2 deletions C#/source/Yitter.IdGenerator/DefaultIdGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace Yitter.IdGenerator
/// </summary>
public class DefaultIdGenerator : IIdGenerator
{
private ISnowWorker _SnowWorker { get; set; }
protected virtual ISnowWorker _SnowWorker { get; set; }

//public Action<OverCostActionArg> GenIdActionAsync
//{
Expand Down Expand Up @@ -122,7 +122,7 @@ public DefaultIdGenerator(IdGeneratorOptions options)
}


public long NewLong()
public virtual long NewLong()
{
return _SnowWorker.NextId();
}
Expand Down