Dear all,
I have a code which try to reads all overrides of a method, but it seems
that Cecil does not fill overrides collection.
Here is the code:

        private void RenameMethod(MethodDefinition method)
        {
            if (renamedObjects.ContainsKey(method.Name))
                return;
            List<MethodReference> overrides = new List<MethodReference>();

            foreach (MethodReference methodref in method.Overrides)
            {
                overrides.Add(methodref);
            }
            method.Name = GetNewName();
            renamedObjects.Add(method.Name, method.Name);
            foreach (MethodReference methodRef in overrides)
            {
                methodRef.Name = method.Name;
            }

Is there anything wrong with what I did?
thank you.

--~--~---------~--~----~------------~-------~--~----~
--
mono-cecil
-~----------~----~----~----~------~----~------~--~---

Reply via email to