<ItemGroup> <PackageReference Include="IdGen" Version="3.0.5" /> <PackageReference Include="Nanoid" Version="3.0.0" /> <PackageReference Include="Snowflake.Core" Version="2.0.0" /> </ItemGroup>
public async Task<string> DoworkIDs() { // IdGenerator idgen = new IdGenerator(); // long getid = idgen.CreateId(); string nanoidStr = await NanoidDotNet.Nanoid.GenerateAsync(); long getId3 = new IdGen.IdGenerator(3).CreateId(); long getId10 = new IdGen.IdGenerator(10).CreateId(); Snowflake.Core.IdWorker snowflake = new Snowflake.Core.IdWorker(1,2,8); long snowflakeId = snowflake.NextId(); return await Task.FromResult($"==getId3=={getId3},=====getId10={getId10},=====nanoidStr={nanoidStr}===snowflakeId=={snowflakeId}"); }