private static bool CheckTypeForMethodUsage (TypeDefinition type, MethodReference method) { if (type.HasGenericParameters) type = type.GetElementType ().Resolve (); HashSet<ulong> methods = GetCache (type); if (methods.Contains (GetToken (method))) return true; MethodDefinition md = method.Resolve (); if ((md != null) && md.HasOverrides) { foreach (MethodReference mr in md.Overrides) { if (methods.Contains (GetToken (mr))) return true; } } return false; }
private static bool DontConsiderForMethodRenaming(TypeDefinition declaringType) { return declaringType.FullName.StartsWith("Dot42.Internal.") || declaringType.IsPrimitive// TODO: check this. || declaringType.GetElementType().IsNullableT() || declaringType.FullName == "System.String" || (declaringType.FullName.StartsWith("System") && declaringType.IsInterface); }