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