public void Update(PersistentDriveInfo d) { if (d != null) { d.lastInserted = DateTime.Now; this.Save(); } }
public void Remove(string serial) { bool flag = false; PersistentDriveInfo persistentDriveInfo = this.Find(serial); if (persistentDriveInfo != null) { this.persistentDriveInfos.Remove(persistentDriveInfo); flag = true; } if (flag) { this.Save(); } }
public void Add(PersistentDriveInfo d) { bool flag = false; if (this.Find(d.serial) == null) { if (this.wasEmptyOnLoad) { d.creationTime -= PersistentDriveInfoList.PersistentDriveExpiration; } this.persistentDriveInfos.Add(d); flag = true; } if (flag) { this.Save(); } }
public void Remove(PersistentDriveInfo d) { this.Remove(d.serial); }