Remove packaged runtime repository dependency

This commit is contained in:
gamer147
2026-07-31 08:50:26 -04:00
parent 49722c55fe
commit 53823d4c10
8 changed files with 88 additions and 14 deletions

View File

@@ -5,7 +5,14 @@ public static class OpcodeTableJson
{
public static OpcodeTable Load(string path)
{
using var doc = JsonDocument.Parse(File.ReadAllText(path));
using FileStream stream = File.OpenRead(path);
return Load(stream);
}
public static OpcodeTable Load(Stream stream)
{
ArgumentNullException.ThrowIfNull(stream);
using var doc = JsonDocument.Parse(stream);
var dict = new Dictionary<int, (string, int)>();
foreach (var e in doc.RootElement.GetProperty("opcodes").EnumerateArray())
{