Update code since some dnlib APIs were modified
This commit is contained in:
parent
c5e242f5ed
commit
032c532809
|
@ -19,6 +19,7 @@
|
|||
|
||||
using System.Collections.Generic;
|
||||
using dnlib.DotNet;
|
||||
using dnlib.Threading;
|
||||
|
||||
namespace de4dot.blocks {
|
||||
public struct GenericArgsSubstitutor {
|
||||
|
@ -291,7 +292,7 @@ namespace de4dot.blocks {
|
|||
newSig.Params.Add(Create2(sig.Params[i]));
|
||||
newSig.GenParamCount = sig.GenParamCount;
|
||||
if (sig.ParamsAfterSentinel != null) {
|
||||
newSig.ParamsAfterSentinel = new List<TypeSig>();
|
||||
newSig.ParamsAfterSentinel = ThreadSafeListCreator.Create<TypeSig>();
|
||||
for (int i = 0; i < sig.ParamsAfterSentinel.Count; i++)
|
||||
newSig.ParamsAfterSentinel.Add(Create2(sig.ParamsAfterSentinel[i]));
|
||||
}
|
||||
|
|
|
@ -61,15 +61,14 @@ namespace de4dot.code {
|
|||
return false;
|
||||
}
|
||||
|
||||
public bool HasMethodBody(uint rid) {
|
||||
return GetDumpedMethod(rid) != null;
|
||||
}
|
||||
|
||||
public MethodBody GetMethodBody(uint rid, RVA rva, IList<Parameter> parameters) {
|
||||
public bool GetMethodBody(uint rid, RVA rva, IList<Parameter> parameters, out MethodBody methodBody) {
|
||||
var dm = GetDumpedMethod(rid);
|
||||
if (dm == null)
|
||||
return null;
|
||||
return MethodBodyReader.CreateCilBody(module, dm.code, dm.extraSections, parameters, dm.mhFlags, dm.mhMaxStack, dm.mhCodeSize, dm.mhLocalVarSigTok);
|
||||
if (dm == null) {
|
||||
methodBody = null;
|
||||
return false;
|
||||
}
|
||||
methodBody = MethodBodyReader.CreateCilBody(module, dm.code, dm.extraSections, parameters, dm.mhFlags, dm.mhMaxStack, dm.mhCodeSize, dm.mhLocalVarSigTok);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user