public void TestMultiThreadedSingletonInstanceEquals() { MultiThreadedSingleton obj = MultiThreadedSingleton.Instance; MultiThreadedSingleton obj2 = MultiThreadedSingleton.Instance; Assert.AreEqual(obj, obj2); }
public static MultiThreadedSingleton GetInstance(string value) { if (_instance == null) { lock (_lock) { if (_instance == null) { _instance = new MultiThreadedSingleton(); _instance.Value = value; } } } return(_instance); }