Пример #1
0
        internal static bool IsDefined(RuntimeMethodInfo method, Type caType)
        {
            int  num;
            bool flag = (caType == typeof(object)) || (caType == typeof(Attribute));

            if (!flag && (s_pca[caType] == null))
            {
                return(false);
            }
            return(((flag || (caType == typeof(DllImportAttribute))) && DllImportAttribute.IsDefined(method)) || (((flag || (caType == typeof(PreserveSigAttribute))) && PreserveSigAttribute.IsDefined(method)) || ((flag || IsSecurityAttribute(caType)) && (GetCustomAttributes(method, caType, true, out num).Length != 0))));
        }
Пример #2
0
        internal static bool IsDefined(RuntimeMethodInfo method, RuntimeType caType)
        {
            bool flag = caType == (RuntimeType)typeof(object) || caType == (RuntimeType)typeof(Attribute);
            int  num;

            return((flag || !(PseudoCustomAttribute.s_pca.GetValueOrDefault(caType) == null)) && (((flag || caType == (RuntimeType)typeof(DllImportAttribute)) && DllImportAttribute.IsDefined(method)) || ((flag || caType == (RuntimeType)typeof(PreserveSigAttribute)) && PreserveSigAttribute.IsDefined(method)) || ((flag || PseudoCustomAttribute.IsSecurityAttribute(caType)) && PseudoCustomAttribute.GetCustomAttributes(method, caType, true, out num).Length != 0)));
        }