// (C) 2001 Ximian, Inc. http://www.ximian.com
//
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.InteropServices;
namespace System.Reflection.Emit {
-#if NET_2_0
[ComVisible (true)]
[ComDefaultInterface (typeof (_EnumBuilder))]
-#endif
[ClassInterface (ClassInterfaceType.None)]
public sealed class EnumBuilder : Type, _EnumBuilder {
private TypeBuilder _tb;
return _tb;
}
+ internal override Type InternalResolve ()
+ {
+ return _tb.InternalResolve ();
+ }
+
+
public override Assembly Assembly {
get {
return _tb.Assembly;
return res;
}
+#if NET_4_0
+ public override Type GetEnumUnderlyingType ()
+ {
+ return _underlyingType;
+ }
+#endif
+
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern void setup_enum_type (Type t);
public FieldBuilder DefineLiteral (string literalName, object literalValue)
{
-#if NET_2_0
Type fieldType = this;
-#else
- Type fieldType = _underlyingType;
-#endif
FieldBuilder fieldBuilder = _tb.DefineField (literalName,
fieldType, (FieldAttributes.Literal |
(FieldAttributes.Static | FieldAttributes.Public)));
modifiers);
}
-#if NET_2_0
[ComVisible (true)]
-#endif
public override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr)
{
return _tb.GetConstructors (bindingAttr);
return _tb.GetInterface (name, ignoreCase);
}
-#if NET_2_0
[ComVisible (true)]
-#endif
public override InterfaceMapping GetInterfaceMap (Type interfaceType)
{
return _tb.GetInterfaceMap (interfaceType);
return _tb.IsDefined (attributeType, inherit);
}
-#if NET_2_0
public override Type MakeArrayType ()
{
return new ArrayType (this, 0);
{
return new PointerType (this);
}
-#endif
public void SetCustomAttribute (CustomAttributeBuilder customBuilder)
{
_tb.SetCustomAttribute (customBuilder);
}
-#if NET_2_0
[ComVisible (true)]
-#endif
public void SetCustomAttribute (ConstructorInfo con, byte[] binaryAttribute)
{
SetCustomAttribute (new CustomAttributeBuilder (con, binaryAttribute));
{
throw new NotImplementedException ();
}
+
+ internal override bool IsUserType {
+ get {
+ return false;
+ }
+ }
}
}
+#endif