Add getModuleAttribute()

This commit is contained in:
de4dot 2012-08-15 19:33:57 +02:00
parent 8adf6ba5e2
commit bfcd42804e

View File

@ -691,6 +691,11 @@ namespace de4dot.code.deobfuscators {
return list.Count == 0 ? null : list[0];
}
protected CustomAttribute getModuleAttribute(TypeReference attr) {
var list = new List<CustomAttribute>(DotNetUtils.findAttributes(module, attr));
return list.Count == 0 ? null : list[0];
}
protected bool hasMetadataStream(string name) {
foreach (var stream in module.MetadataStreams) {
if (stream.Name == name)