Esempio n. 1
0
        public static ActionLog Load(SourceSettings ss, IWarningLogger uilog)
        {
            ActionLog ld = null;

            if (uilog == null)
            {
                throw new ArgumentNullException();
            }

            string path = ss.PathToStateItem(LogName);

            if (File.Exists(path))
            {
                ld = (ActionLog)SafeFileSerializer.Load(path, uilog);
            }

            if (ld == null)
            {
                // Didn't exist or failed to recover
                ld = new ActionLog();
            }

            ld.uilog = uilog;
            return(ld);
        }
Esempio n. 2
0
        public static FileStateTable Load(string path, IWarningLogger log)
        {
            FileStateTable fst;

            fst = (FileStateTable)SafeFileSerializer.Load(path, log);
            if (fst == null)
            {
                fst = new FileStateTable();
            }

            return(fst);
        }
Esempio n. 3
0
 public bool Save(string path, IWarningLogger log)
 {
     return(SafeFileSerializer.Save(path, this, log));
 }
Esempio n. 4
0
 public bool Save(SourceSettings ss)
 {
     return(SafeFileSerializer.Save(ss.PathToStateItem(LogName), this, uilog));
 }