private void RefactorMethods(FilteredTypeMembers methods, string oldName, string newName)
{
// Do this for all member extensions wrapping methods.
foreach (CodeTypeMemberExtension memberExtension in methods)
{
// Get a reference to the underlying CodeMemberMethod object.
CodeMemberMethod method = (CodeMemberMethod)memberExtension.ExtendedObject;
// Update the parameters types.
RefactorMethodParameterReferences(method.Parameters, oldName, newName);
// Do we have a return type?
if (method.ReturnType != null)
{
// Update the return type if necessary.
RefactorCodeTypeReference(method.ReturnType, oldName, newName);
}
// Update method attributes.
RefactorCodeTypeReferencesInAttributes(method.CustomAttributes, oldName, newName);
// Update the statements.
RefactorCodeStatements(method.Statements, oldName, newName);
}
}