/// <summary> /// Are method reference a and b the same or both null? /// Note! Declaring type is not taken into account! /// </summary> public static bool AreSameOrNull(this MethodReference a, MethodReference b, Func <GenericParameter, TypeReference> genericParamResolver) { if ((a == null) && (b == null)) { return(true); } if ((a == null) || (b == null)) { return(false); } return(a.AreSame(b, genericParamResolver)); }
/// <summary> /// Are method reference a and b the same? /// Note! Declaring type IS taken into account! /// </summary> public static bool AreSameIncludingDeclaringType(this MethodReference a, MethodReference b, Func <GenericParameter, TypeReference> genericParamResolver) { return(a.AreSame(b, genericParamResolver) && a.DeclaringType.GetElementType().AreSame(b.DeclaringType.GetElementType(), genericParamResolver)); }