diff --git a/C#/source/Yitter.IdGenerator/Contract/ISnowWorker.cs b/C#/source/Yitter.IdGenerator/Contract/ISnowWorker.cs index 93d1b19..7de1ae0 100644 --- a/C#/source/Yitter.IdGenerator/Contract/ISnowWorker.cs +++ b/C#/source/Yitter.IdGenerator/Contract/ISnowWorker.cs @@ -13,7 +13,7 @@ namespace Yitter.IdGenerator { - internal interface ISnowWorker + public interface ISnowWorker { //Action GenAction { get; set; } diff --git a/C#/source/Yitter.IdGenerator/Core/SnowWorkerM1.cs b/C#/source/Yitter.IdGenerator/Core/SnowWorkerM1.cs index 07a0040..1c52a62 100644 --- a/C#/source/Yitter.IdGenerator/Core/SnowWorkerM1.cs +++ b/C#/source/Yitter.IdGenerator/Core/SnowWorkerM1.cs @@ -16,7 +16,7 @@ namespace Yitter.IdGenerator /// /// 雪花漂移算法 /// - internal class SnowWorkerM1 : ISnowWorker + public class SnowWorkerM1 : ISnowWorker { /// /// 基础时间 diff --git a/C#/source/Yitter.IdGenerator/Core/SnowWorkerM2.cs b/C#/source/Yitter.IdGenerator/Core/SnowWorkerM2.cs index 14a12f9..e7e32dd 100644 --- a/C#/source/Yitter.IdGenerator/Core/SnowWorkerM2.cs +++ b/C#/source/Yitter.IdGenerator/Core/SnowWorkerM2.cs @@ -16,7 +16,7 @@ namespace Yitter.IdGenerator /// /// 常规雪花算法 /// - internal class SnowWorkerM2 : SnowWorkerM1 + public class SnowWorkerM2 : SnowWorkerM1 { public SnowWorkerM2(IdGeneratorOptions options) : base(options) { diff --git a/C#/source/Yitter.IdGenerator/Core/SnowWorkerM3.cs b/C#/source/Yitter.IdGenerator/Core/SnowWorkerM3.cs index 4ad78a7..a2e4efe 100644 --- a/C#/source/Yitter.IdGenerator/Core/SnowWorkerM3.cs +++ b/C#/source/Yitter.IdGenerator/Core/SnowWorkerM3.cs @@ -16,7 +16,7 @@ namespace Yitter.IdGenerator /// /// 雪花漂移算法(支持数据中心ID和秒级时间戳) /// - internal class SnowWorkerM3 : SnowWorkerM1 + public class SnowWorkerM3 : SnowWorkerM1 { /// /// 数据中心ID(默认0) diff --git a/C#/source/Yitter.IdGenerator/DefaultIdGenerator.cs b/C#/source/Yitter.IdGenerator/DefaultIdGenerator.cs index ea4e2a9..89b3af5 100644 --- a/C#/source/Yitter.IdGenerator/DefaultIdGenerator.cs +++ b/C#/source/Yitter.IdGenerator/DefaultIdGenerator.cs @@ -19,7 +19,7 @@ namespace Yitter.IdGenerator /// public class DefaultIdGenerator : IIdGenerator { - private ISnowWorker _SnowWorker { get; set; } + protected virtual ISnowWorker _SnowWorker { get; set; } //public Action GenIdActionAsync //{ @@ -122,7 +122,7 @@ public DefaultIdGenerator(IdGeneratorOptions options) } - public long NewLong() + public virtual long NewLong() { return _SnowWorker.NextId(); }