Example #1
0
        public static bool IsEqual(Reflector.CodeModel.IMethodReference m, MethodReference mr, bool checkReturnType)
        {
            string mrName = InsUtils.GetOldMemberName(mr);

            if (m.Name == mrName &&
                (!checkReturnType || IsEqual(m.ReturnType.Type, mr.ReturnType)) &&
                m.Parameters.Count == mr.Parameters.Count
                )
            {
                bool matched = true;
                for (int i = 0; i < mr.Parameters.Count; i++)
                {
                    if (!IsEqual(m.Parameters[i].ParameterType,
                                 mr.Parameters[i].ParameterType))
                    {
                        matched = false;
                        break;
                    }
                }
                return(matched);
            }
            return(false);
        }
Example #2
0
 public static bool IsEqual(Reflector.CodeModel.IMethodReference m, MethodReference mr)
 {
     return(IsEqual(m, mr, true));
 }