public static bool IsHiddenMethod(MethodInfo mi)
        {
            object[] MethodAttributes = mi.GetCustomAttributes(typeof(TypeLibFuncAttribute), true);

            if (MethodAttributes.Length > 0)
            {
                TypeLibFuncAttribute tlf   = ( TypeLibFuncAttribute )MethodAttributes[0];
                TypeLibFuncFlags     flags = tlf.Value;
                return((flags & TypeLibFuncFlags.FHidden) != 0);
            }
            return(false);
        }
Exemple #2
0
        public void Ctor_ShortFlags(short flags)
        {
            var attribute = new TypeLibFuncAttribute(flags);

            Assert.Equal((TypeLibFuncFlags)flags, attribute.Value);
        }
Exemple #3
0
        public void Ctor_TypeLibFuncFlags(TypeLibFuncFlags flags)
        {
            var attribute = new TypeLibFuncAttribute(flags);

            Assert.Equal(flags, attribute.Value);
        }