static internal bool IsCAReturnValueDefined(RuntimeMethodInfo method, Type caType, bool inherit) { int token = CustomAttribute.GetMethodRetValueToken(method); if (token != 0) { IntPtr module = CustomAttribute.GetMemberModule(method, MemberTypes.Method); return(IsCADefinedCheckType(caType, module, token)); } return(false); }
static internal Object[] GetCAReturnValue(RuntimeMethodInfo method, Type caType, bool inherit) { int token = CustomAttribute.GetMethodRetValueToken(method); if (token != 0) { IntPtr module = CustomAttribute.GetMemberModule(method, MemberTypes.Method); CustomAttribute caItem = CustomAttribute.GetCustomAttributeListCheckType(token, module, caType, null, 0); return(CustomAttribute.CheckConsistencyAndCreateArray(caItem, caType)); } return((caType == null || caType.IsValueType) ? s_gObjectEmptyArray : (Object[])Array.CreateInstance(caType, 0)); }