mirror of
https://github.com/ZuneDev/ZuneUIXTools.git
synced 2026-07-27 13:11:59 -07:00
Allow generic load result
This commit is contained in:
@@ -5,7 +5,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Microsoft.Iris.Asm;
|
||||
|
||||
@@ -26,7 +25,13 @@ public class Disassembler
|
||||
};
|
||||
}
|
||||
|
||||
public static Disassembler Load(MarkupLoadResult loadResult) => new(loadResult);
|
||||
public static Disassembler Load(LoadResult loadResult)
|
||||
{
|
||||
if (loadResult is not MarkupLoadResult markupLoadResult)
|
||||
throw new ArgumentException($"Disassembly can only be performed on markup. Expected '{nameof(MarkupLoadResult)}', got '{loadResult?.GetType().Name}'.");
|
||||
|
||||
return new(markupLoadResult);
|
||||
}
|
||||
|
||||
public IEnumerable<Directive> GetExports()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user