Add another getField overload
This commit is contained in:
parent
8c619dff91
commit
9079445e01
|
@ -458,6 +458,16 @@ namespace de4dot.blocks {
|
|||
return null;
|
||||
}
|
||||
|
||||
public static FieldDefinition getField(TypeDefinition type, string name) {
|
||||
if (type == null)
|
||||
return null;
|
||||
foreach (var field in type.Fields) {
|
||||
if (field.Name == name)
|
||||
return field;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static IEnumerable<MethodReference> getMethodCalls(MethodDefinition method) {
|
||||
var list = new List<MethodReference>();
|
||||
if (method.HasBody) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user