public void ReadFromDisk () { using (var stream = new FileStream (testSuite.CachePath, FileMode.Open, FileAccess.Read)) { var formatter = new BinaryFormatter (); cachedTestInfo = (CachedTestInfo)formatter.Deserialize (stream); modified = false; } }
public NunitTestInfo GetInfo(string path) { CachedTestInfo cti = (CachedTestInfo)table [path]; if (cti != null && File.Exists(path) && File.GetLastWriteTime(path) == cti.LastWriteTime) { return(cti.Info); } else { return(null); } }
public void SetInfo(string path, TestInfo info) { if (File.Exists (path)) { CachedTestInfo cti = new CachedTestInfo (); cti.LastWriteTime = File.GetLastWriteTime (path); cti.Info = info; table [path] = cti; modified = true; } }