|
1234567891011121314151617181920212223242526272829303132333435363738 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace TBMM
- {
- public class ModInfo
- {
- public string Name { get; set; }
- /// <summary>
- /// Installed version. Can be null.
- /// </summary>
- public Version Version { get; set; }
- public Version LatestVersion { get; set; }
- /// <summary>
- /// Can be null.
- /// </summary>
- public string Description { get; set; }
- /// <summary>
- /// Can be null.
- /// </summary>
- public string Author { get; set; }
- /// <summary>
- /// The time when the mod was last updated by its author.
- /// </summary>
- public DateTime LastUpdated { get; set; }
- public bool Installed => Version != null;
- public string DownloadURL { get; set; }
- public HashSet<string> ModFiles { get; set; }
- public string UpdateDetails { get; set; }
- public bool Updatable => Version != null && LatestVersion != null && Version < LatestVersion;
- public bool? Broken { get; set; }
-
- public bool Outdated(DateTime lastGameUpdateTime) => LastUpdated != default && LastUpdated < lastGameUpdateTime;
- }
- }
|