// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
[ComVisible (true)]
[ComDefaultInterface (typeof (_ConstructorBuilder))]
[ClassInterface (ClassInterfaceType.None)]
+ [StructLayout (LayoutKind.Sequential)]
public sealed class ConstructorBuilder : ConstructorInfo, _ConstructorBuilder {
#pragma warning disable 169, 414
public override ParameterInfo[] GetParameters ()
{
- if (!type.is_created && !IsCompilerContext)
+ if (!type.is_created)
throw not_created ();
return GetParametersInternal ();
return parameters.Length;
}
+
+ internal override Type GetParameterType (int pos) {
+ return parameters [pos];
+ }
public override Object Invoke (Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
{
public override object [] GetCustomAttributes (bool inherit)
{
- /*
- * 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 && IsCompilerContext)
- return MonoCustomAttrs.GetCustomAttributes (this, inherit);
- else
- throw not_supported ();
+ throw not_supported ();
}
public override object [] GetCustomAttributes (Type attributeType, bool inherit)
{
- if (type.is_created && IsCompilerContext)
- return MonoCustomAttrs.GetCustomAttributes (this, attributeType, inherit);
- else
- throw not_supported ();
+ throw not_supported ();
}
public ILGenerator GetILGenerator ()
return type.get_next_table_index (obj, table, inc);
}
- private bool IsCompilerContext {
- get {
- ModuleBuilder mb = (ModuleBuilder) TypeBuilder.Module;
- AssemblyBuilder ab = (AssemblyBuilder) mb.Assembly;
- return ab.IsCompilerContext;
- }
- }
-
private void RejectIfCreated ()
{
if (type.is_created)
}
}
}
+#endif