mirror of
https://github.com/ZuneDev/ZuneModdingHelper.git
synced 2026-07-27 13:12:21 -07:00
32 lines
783 B
C#
32 lines
783 B
C#
using System;
|
|
using System.Text.Json;
|
|
using System.Text.Json.Serialization;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace ZuneModCore
|
|
{
|
|
public class ModDependency
|
|
{
|
|
public string Id { get; set; }
|
|
|
|
public ReleaseVersion Version { get; set; }
|
|
|
|
public ModDependency(string id, ReleaseVersion? version = null)
|
|
{
|
|
Id = id;
|
|
Version = version ?? ModManager.CurrentVersion;
|
|
}
|
|
|
|
/// <summary>
|
|
/// DO NOT USE DIRECTLY. This constructor is only for
|
|
/// JSON de/serialization.
|
|
/// </summary>
|
|
[Obsolete]
|
|
internal ModDependency() { }
|
|
|
|
public Task<bool> CheckStatus() => ModManager.CheckStatus(Id);
|
|
|
|
public override string ToString() => $"{Id} / {Version}";
|
|
}
|
|
}
|