/// <summary> /// Use this server, updating it's last use date /// </summary> public void Use() { lastUseDate = UnixDate.DateTimeToUnixTime(DateTime.Now); Save(); }
/// <summary> /// Generates a new backup from an old backup /// </summary> /// <param name="backup">The old backup without the creation date set</param> /// <returns>The backup with the creation dae set</returns> public static Backup Generate(Backup backup) { backup.creationDate = UnixDate.DateTimeToUnixTime(DateTime.Now); return(backup); }
/// <summary> /// Create a new instance of a Server /// </summary> public Server() { creationDate = lastUseDate = UnixDate.DateTimeToUnixTime(DateTime.Now); }
/// <summary> /// Sets the creation date to now /// </summary> public void SetCreation() { creationDate = UnixDate.DateTimeToUnixTime(DateTime.Now); }