Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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));
        }