Ejemplo 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);
        }
Ejemplo 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);
        }
Ejemplo n.º 3
0
 public bool Save(string path, IWarningLogger log)
 {
     return(SafeFileSerializer.Save(path, this, log));
 }
Ejemplo n.º 4
0
 public bool Save(SourceSettings ss)
 {
     return(SafeFileSerializer.Save(ss.PathToStateItem(LogName), this, uilog));
 }