/// <summary> /// Returns the single instance of the <c>StateManager</c>. /// </summary> /// <returns>The single instance of the <c>StateManager</c></returns> public static StateManager GetInstance() { if (instance == null) { // ensure only one thread is able to instantiate an instance at a time. lock (syncRoot) { if (instance == null) { instance = new StateManager(); } } } return instance; }
public void Reset() { instance = null; LogManager.GetCurrentClassLogger().Info( infoMessage => infoMessage("StateManager reset.")); }