You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

IIdGenerator.cs 772 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
1234567891011121314151617181920212223242526272829
  1. /*
  2. * 版权属于:yitter(yitter@126.com)
  3. * 开源地址:https://gitee.com/yitter/idgenerator
  4. * 版权协议:MIT
  5. * 版权说明:只要保留本版权,你可以免费使用、修改、分发本代码。
  6. * 免责条款:任何因为本代码产生的系统、法律、政治、宗教问题,均与版权所有者无关。
  7. *
  8. */
  9. using System;
  10. namespace Yitter.IdGenerator
  11. {
  12. public interface IIdGenerator
  13. {
  14. /// <summary>
  15. /// 生成过程中产生的事件
  16. /// </summary>
  17. Action<OverCostActionArg> GenIdActionAsync { get; set; }
  18. /// <summary>
  19. /// 生成新的long型Id
  20. /// </summary>
  21. /// <returns></returns>
  22. long NewLong();
  23. // Guid NewGuid();
  24. }
  25. }

雪花算法中非常好用的数字ID生成器