Exemplo n.º 1
0
 public static bool IsHiddenInterface(Type InterfaceType)
 {
     object[] InterfaceAttributes = InterfaceType.GetCustomAttributes(typeof(TypeLibTypeAttribute), false);
     if (InterfaceAttributes.Length > 0)
     {
         TypeLibTypeAttribute tlt   = ( TypeLibTypeAttribute )InterfaceAttributes[0];
         TypeLibTypeFlags     flags = tlt.Value;
         return((flags & TypeLibTypeFlags.FHidden) != 0);
     }
     return(false);
 }
        public void Ctor_ShortFlags(short flags)
        {
            var attribute = new TypeLibTypeAttribute(flags);

            Assert.Equal((TypeLibTypeFlags)flags, attribute.Value);
        }
        public void Ctor_TypeLibTypeFlags(TypeLibTypeFlags flags)
        {
            var attribute = new TypeLibTypeAttribute(flags);

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