public static SnowFlakGenerator Instance() { if (snowflake == null) { snowflake = new SnowFlakGenerator(); } return(snowflake); }
public static IIDGenerator Create(GeneratorType type) { IIDGenerator generator = null; switch (type) { case GeneratorType.GUID: generator = new GUIDGenerator(); break; case GeneratorType.SnowFlak: generator = new SnowFlakGenerator(); break; } return(generator); }