Пример #1
0
 public void Dispose()
 {
     if (journalEntries != null)
     {
         journalEntries.Clear();
         journalEntries = null;
     }
 }
Пример #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);
                }
            }
        }
Пример #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;
         }
     }
 }