Esempio n. 1
0
 public void Dispose()
 {
     if (_entries != null)
     {
         _entries.Clear();
         _entries = null;
     }
 }
Esempio n. 2
0
 public void Load()
 {
     lock (this)
     {
         try
         {
             _entries = (JournalDictionary)BinarySerialization.Deserialize(dataFile);
             LoadOb();                    
         }
         catch (Exception ex)
         {
             _entries = new JournalDictionary();
             BinarySerialization.Serialize(dataFile, _entries);
             LoadOb(); 
             Trace.Write(ex.StackTrace);
         }
     }
 }
Esempio n. 3
0
        public void Save()
        {
            lock (this)
            {
                try
                {
                    if (_entries == null)
                        _entries = new JournalDictionary();

                    BinarySerialization.Serialize(dataFile, _entries);
                    LoadOb();
                }
                catch (Exception ex)
                {
                    Trace.Write(ex.StackTrace);
                }
            }
        }