public static UniqueIdGenerator GetInstance() { lock (Lock) { if (_instance == null) { _instance = new UniqueIdGenerator(); } } return(_instance); }
public static void Configure(string firstId) { lock (Lock) { if (_instance == null) { _instance = new UniqueIdGenerator(firstId); } else { throw new InvalidOperationException("Object already exist"); } } }