Exemplo n.º 1
0
        public void TestInstance()
        {
            SaveSingleton save  = SaveSingleton.Instance;
            SaveSingleton save1 = SaveSingleton.Instance;

            Assert.AreEqual(save, save1);
        }
Exemplo n.º 2
0
 /// <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);
     }
 }
Exemplo n.º 3
0
        public override void _runCommand()
        {
            SaveSingleton saveSingleton_ = __singleton <SaveSingleton> ._instance();

            saveSingleton_._runSave();
        }