예제 #1
0
 /// <summary>
 /// Use this server, updating it's last use date
 /// </summary>
 public void Use()
 {
     lastUseDate = UnixDate.DateTimeToUnixTime(DateTime.Now);
     Save();
 }
예제 #2
0
 /// <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);
 }
예제 #3
0
 /// <summary>
 /// Create a new instance of a Server
 /// </summary>
 public Server()
 {
     creationDate = lastUseDate = UnixDate.DateTimeToUnixTime(DateTime.Now);
 }
예제 #4
0
 /// <summary>
 /// Sets the creation date to now
 /// </summary>
 public void SetCreation()
 {
     creationDate = UnixDate.DateTimeToUnixTime(DateTime.Now);
 }