using Microsoft.Extensions.Options; using System; using System.Collections.Generic; using System.Text; using Yitter.IdGenerator; namespace Shentun.Utilities { public static class IdGeneratorHelper { static IdGeneratorHelper() { var options = new IdGeneratorOptions(1); YitIdHelper.SetIdGenerator(options); } public static long CreateSnowflakeId() { return YitIdHelper.NextId(); } } }