Beispiel #1
0
        internal InterfaceObject(Type tp) : base(tp)
        {
            CoClassAttribute coclass = (CoClassAttribute)
                                       Attribute.GetCustomAttribute(tp, cc_attr);

            if (coclass != null)
            {
                ctor = coclass.CoClass.GetConstructor(Type.EmptyTypes);
            }
        }
        public void Ctor_CoClass(Type coClass)
        {
            var attribute = new CoClassAttribute(coClass);

            Assert.Equal(coClass, attribute.CoClass);
        }