public static int IncrementCounter() { if (instance == null) { lock (padlock) { if (instance == null) instance = new Singleton(); } } return instance.counter++; }
public override void HandleSingleton(CompositionBatch batch, Singleton singleton) { batch.AddPart(new ProxyPart(singleton, CreatePart(singleton))); }