/// <summary>
 /// Loads the content of a saved file into memory
 /// Throws Exception if something goes wrong
 /// </summary>
 private void Load()
 {
     FileStream stream = null;
     try
     {
         stream = File.OpenRead(_filePath);
         var deserializer = new BinaryFormatter();
         FileContent = (FileContent)deserializer.Deserialize(stream);
         stream.Close();
     }
     catch (Exception ex)
     {
         if (stream != null)
             stream.Close();
         Logger.Log(ex, String.Format("Unable to open persistent registry file:{0}",_filePath));
         throw;
     }
 }
Exemplo n.º 2
0
 public void Dispose()
 {
     this.FileContent = null;
 }
Exemplo n.º 3
0
 public void Dispose()
 {
     this.FileContent = null;
 }