#if NET_2_0
[ComVisible (true)]
- [ClassInterfaceAttribute (ClassInterfaceType.None)]
- [ComDefaultInterfaceAttribute (typeof (_ConstructorBuilder))]
+ [ComDefaultInterface (typeof (_ConstructorBuilder))]
#endif
- public sealed class ConstructorBuilder : ConstructorInfo {
+ [ClassInterface (ClassInterfaceType.None)]
+ public sealed class ConstructorBuilder : ConstructorInfo, _ConstructorBuilder {
private RuntimeMethodHandle mhandle;
private ILGenerator ilgen;
private Type[] parameters;
}
public override object [] GetCustomAttributes (bool inherit) {
- throw not_supported ();
+ /*
+ * On MS.NET, this always returns not_supported, but we can't do this
+ * since there would be no way to obtain custom attributes of
+ * dynamically created ctors.
+ */
+ if (type.is_created)
+ return MonoCustomAttrs.GetCustomAttributes (this, inherit);
+ else
+ throw not_supported ();
}
- public override object [] GetCustomAttributes (Type attribute_type, bool inherit) {
- throw not_supported ();
+ public override object [] GetCustomAttributes (Type attributeType, bool inherit) {
+ if (type.is_created)
+ return MonoCustomAttrs.GetCustomAttributes (this, attributeType, inherit);
+ else
+ throw not_supported ();
}
public ILGenerator GetILGenerator () {
private Exception not_after_created () {
return new InvalidOperationException ("Unable to change after type has been created.");
}
+
+ void _ConstructorBuilder.GetIDsOfNames ([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId)
+ {
+ throw new NotImplementedException ();
+ }
+
+ void _ConstructorBuilder.GetTypeInfo (uint iTInfo, uint lcid, IntPtr ppTInfo)
+ {
+ throw new NotImplementedException ();
+ }
+
+ void _ConstructorBuilder.GetTypeInfoCount (out uint pcTInfo)
+ {
+ throw new NotImplementedException ();
+ }
+
+ void _ConstructorBuilder.Invoke (uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
+ {
+ throw new NotImplementedException ();
+ }
}
}