public void TestInstance() { SaveSingleton save = SaveSingleton.Instance; SaveSingleton save1 = SaveSingleton.Instance; Assert.AreEqual(save, save1); }
/// <summary> /// This method is for saving the messages into a file. /// </summary> /// <param name="message">The message to be saved</param> /// <param name="header">The header - which will be used as the file name.json</param> /// <returns>True - the file can save. False if something unexpected happens.</returns> public bool Save(Message message, string header) { try { SaveSingleton ss = SaveSingleton.Instance; ss.WriteData(message, header); return(true); } catch (Exception e) { throw new Exception(e.Message); } }
public override void _runCommand() { SaveSingleton saveSingleton_ = __singleton <SaveSingleton> ._instance(); saveSingleton_._runSave(); }