Exemplo n.º 1
0
 public void Dispose()
 {
     if (_entries != null)
     {
         _entries.Clear();
         _entries = null;
     }
 }
Exemplo 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);
         }
     }
 }
Exemplo 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);
                }
            }
        }