mirror of
https://github.com/ZuneDev/ZuneUIXTools.git
synced 2026-07-27 13:11:59 -07:00
More inline scripts, shared classes
This commit is contained in:
@@ -78,6 +78,8 @@ internal class DecompileContext
|
||||
|
||||
public PropertySchema GetImportedProperty(Operand op) => ImportTables.PropertyImports[(ushort)op.Value];
|
||||
|
||||
public ConstructorSchema GetImportedConstructor(Operand op) => ImportTables.ConstructorImports[(ushort)op.Value];
|
||||
|
||||
public IEnumerable<Instruction> GetMethodBody(uint startOffset)
|
||||
{
|
||||
foreach (var instruction in Instructions.SkipWhile(i => i.Offset < startOffset))
|
||||
@@ -111,7 +113,14 @@ internal class DecompileContext
|
||||
{
|
||||
var prefix = MapNamespaceToPrefix(schema.Owner.Uri);
|
||||
var ns = _namespaces[prefix ?? ""];
|
||||
return ns + schema.Name;
|
||||
|
||||
// Strip potential generic type parameters
|
||||
var name = schema.Name;
|
||||
var genericIndex = name.IndexOf('`');
|
||||
if (genericIndex > 0)
|
||||
name = name[..genericIndex];
|
||||
|
||||
return ns + name;
|
||||
}
|
||||
|
||||
private void GenerateNamespaces()
|
||||
|
||||
Reference in New Issue
Block a user