Always rename P/Invoke methods

This commit is contained in:
de4dot 2011-12-02 13:18:22 +01:00
parent d913c61df6
commit af0ff59794

View File

@ -349,7 +349,8 @@ namespace de4dot.renamer {
info.renamed = true;
var checker = NameChecker;
if (!NameChecker.isValidMethodName(info.oldName)) {
// PInvoke methods' EntryPoint is always valid. It has to, so always rename.
if (!NameChecker.isValidMethodName(info.oldName) || methodDef.MethodDefinition.PInvokeInfo != null) {
INameCreator nameCreator = null;
string newName = info.suggestedName;
if (methodDef.MethodDefinition.PInvokeInfo != null)