Files
SM64Lib/SM64Lib/Patching/PatchFileInformations.cs
2024-08-18 09:25:16 +02:00

28 lines
631 B
C#

using Newtonsoft.Json.Linq;
namespace SM64Lib.Patching;
public class PatchFileInformations
{
public string PatchFileName { get; set; }
public string ClassPath { get; set; }
public string MethodName { get; set; }
public void Set(PatchScript script)
{
script.Script = JObject.FromObject(this).ToString();
}
public static PatchFileInformations Get(PatchScript script)
{
try
{
return JObject.Parse(script.Script).ToObject<PatchFileInformations>();
}
catch (Exception)
{
return new PatchFileInformations();
}
}
}