Register resolve handler before loading types
This commit is contained in:
Родитель
2dbeec00a3
Коммит
9e0397dab6
|
@ -58,12 +58,13 @@ namespace Confuser.Runtime {
|
||||||
Array.Clear(b, 0, b.Length);
|
Array.Clear(b, 0, b.Length);
|
||||||
h.Free();
|
h.Free();
|
||||||
Array.Clear(q, 0, q.Length);
|
Array.Clear(q, 0, q.Length);
|
||||||
// For some reasons, reflection on Assembly would not discover the types unless GetTypes is called.
|
|
||||||
m.GetTypes();
|
|
||||||
|
|
||||||
key = n.ResolveSignature(Mutation.KeyI2);
|
key = n.ResolveSignature(Mutation.KeyI2);
|
||||||
AppDomain.CurrentDomain.AssemblyResolve += Resolve;
|
AppDomain.CurrentDomain.AssemblyResolve += Resolve;
|
||||||
|
|
||||||
|
// For some reasons, reflection on Assembly would not discover the types unless GetTypes is called.
|
||||||
|
m.GetTypes();
|
||||||
|
|
||||||
MethodBase e = m.ResolveMethod(key[0] | (key[1] << 8) | (key[2] << 16) | (key[3] << 24));
|
MethodBase e = m.ResolveMethod(key[0] | (key[1] << 8) | (key[2] << 16) | (key[3] << 24));
|
||||||
var g = new object[e.GetParameters().Length];
|
var g = new object[e.GetParameters().Length];
|
||||||
if (g.Length != 0)
|
if (g.Length != 0)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче