Ejemplo n.º 1
0
 public void Dispose()
 {
     if (journalEntries != null)
     {
         journalEntries.Clear();
         journalEntries = null;
     }
 }
Ejemplo n.º 2
0
        public void Save()
        {
            lock (this)
            {
                try
                {
                    if (journalEntries == null)
                        journalEntries = new JournalDictionary();

                    BinarySerialization.Serialize(dataFile, journalEntries);
                    LoadOb();
                }
                catch (Exception ex)
                {
                    Trace.Write(ex.StackTrace);
                }
            }
        }
Ejemplo n.º 3
0
 public bool Load()
 {
     lock (this)
     {
         try
         {
             journalEntries = (JournalDictionary)BinarySerialization.Deserialize(dataFile);
             return LoadOb();                    
         }
         catch (Exception ex)
         {
             journalEntries = new JournalDictionary();
             BinarySerialization.Serialize(dataFile, journalEntries);
             Trace.Write(ex.StackTrace);
             return false;
         }
     }
 }