not much
in this piece of code just rename metadata methods, fields and properties
but I do not rename the arguments / parameters and returns the methods
and a friend told me that for the parameters / arguments is the collection ParameterDefinition in MethodDefinition.Parameter but he said that these can not be renamed so only offer, as I do in the code for the other things he says to do proxies
but not like them
AssemblyDefinition definition = AssemblyDefinition.ReadAssembly(assembly);
foreach (ModuleDefinition moduleDef in definition.Modules)
{
foreach (TypeDefinition typeDef in moduleDef.Types)
{
foreach (MethodDefinition methodDef in typeDef.Methods)
{
if(!methodDef.IsSpecialName&&!methodDef.IsRuntimeSpecialName&&!methodDef.IsConstructor)
methodDef.Name = generateName(); // just string name generate here
}
foreach (PropertyDefinition propertyDef in typeDef.Properties)
{
propertyDef.Name = generateName();
}
foreach (FieldDefinition fielDef in typeDef.Fields)
{
fielDef.Name = generateName();
}
}
}
definition.Write(n);
}