internal static bool HasMethod(Type type, string name, BindingFlags bindingAttr)
 {
     if ((s_cbmTdpBridge != null) && IsFrameworkType(type))
     {
         Type typeToUseForCBMBridge = GetTypeToUseForCBMBridge(type);
         return(s_cbmTdpBridge.HasMethod(typeToUseForCBMBridge, name, bindingAttr));
     }
     return(GetReflectionType(type).GetMethod(name, bindingAttr) != null);
 }
예제 #2
0
        internal static bool HasMethod(Type type, string name, BindingFlags bindingAttr)
        {
            bool hasMethod = false;

            if (s_cbmTdpBridge != null && IsFrameworkType(type))
            {
                Type typeToUse = GetTypeToUseForCBMBridge(type);
                hasMethod = s_cbmTdpBridge.HasMethod(typeToUse, name, bindingAttr);
            }
            else
            {
                Type       reflectionType = GetReflectionType(type);
                MethodInfo methodInfo     = reflectionType.GetMethod(name, bindingAttr);
                hasMethod = methodInfo != null;
            }
            return(hasMethod);
        }