Hi, Jb,
When I made furthur testing, I found what I said in first post was
wrong.
The old approach is actually working, that means if I change
methodReference.Name which get from module.GetMemberReferences(), the
name will be saved.
The exception is generic type, in AssemblyReader.GetMemberReference
function:
If member reference has generic parameter, it will never be added to
metadata, so always get new instantiation.
MemberReference GetMemberReference (uint rid)
{
InitializeMemberReferences ();
var member = metadata.GetMemberReference (rid);
if (member != null)
return member;
member = ReadMemberReference (rid);
if (!member.ContainsGenericParameter) <== if I remark this line,
seems all member references renamed
metadata.AddMemberReference (member);
return member;
}
Could you tell why there is a checking there, and any impact if I
remark that line?
Thanks
Wicky
--
--
mono-cecil