/* Get File state from the file */ private void ParseAppState() { try { using (FileStream stream = new FileStream(FileName, FileMode.OpenOrCreate)) { BinaryFormatter bin = new BinaryFormatter(); AppData = (WholeAppState)bin.Deserialize(stream); } } catch (Exception e) { log.Error("ParseAppState Error: " + e.Message); } }
public AppState() { AppData = new WholeAppState(); log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); this.ParseAppState(); }