public override object TrackedVisitMethodDeclaration(MethodDeclaration methodDeclaration, object data) { TypeDeclaration typeDeclaration = (TypeDeclaration)methodDeclaration.Parent; if (AstUtil.ContainsModifier(methodDeclaration, Modifiers.Override)) { if (typeDeclaration.BaseTypes.Count > 0) { foreach (TypeReference baseType in typeDeclaration.BaseTypes) { string methodKey; TypeMapping mappings = GetProperMapping(baseType, methodDeclaration, methodDeclaration.Name, out methodKey); if (mappings != null) { string newName = mappings.Members[methodKey]; if (newName.IndexOf('.') == -1 && newName.IndexOf('(') != -1) { newName = newName.Substring(0, newName.IndexOf('(')); methodDeclaration.Name = newName; } } } } } return(base.TrackedVisitMethodDeclaration(methodDeclaration, data)); }
protected bool IsAbstractClass(TypeDeclaration typeDeclaration) { return(typeDeclaration.Type == ClassType.Class && AstUtil.ContainsModifier(typeDeclaration, Modifiers.Abstract)); }