using Easy.Snowflakes; using Microsoft.Extensions.DependencyInjection; namespace Easy.Extensions; public static class ServiceCollectionServiceExtensions { public static IServiceCollection AddDriftingSnowflakes(this IServiceCollection services, ushort workId) { services.AddSingleton(typeof(ISnowflakeIdGenerator), o => { return new DriftingSnowflakeIdGenerator(workId); }); return services; } }