// (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 (_EventBuilder))]
-#endif
[ClassInterface (ClassInterfaceType.None)]
+ [StructLayout (LayoutKind.Sequential)]
public sealed class EventBuilder : _EventBuilder {
- string name;
+#pragma warning disable 169, 414
+ internal string name;
Type type;
TypeBuilder typeb;
CustomAttributeBuilder[] cattrs;
- MethodBuilder add_method;
- MethodBuilder remove_method;
- MethodBuilder raise_method;
- MethodBuilder[] other_methods;
- EventAttributes attrs;
+ internal MethodBuilder add_method;
+ internal MethodBuilder remove_method;
+ internal MethodBuilder raise_method;
+ internal MethodBuilder[] other_methods;
+ internal EventAttributes attrs;
int table_idx;
+#pragma warning restore 169, 414
internal EventBuilder (TypeBuilder tb, string eventName, EventAttributes eventAttrs, Type eventType) {
name = eventName;
if (customBuilder == null)
throw new ArgumentNullException ("customBuilder");
RejectIfCreated ();
-#if NET_2_0
string attrname = customBuilder.Ctor.ReflectedType.FullName;
if (attrname == "System.Runtime.CompilerServices.SpecialNameAttribute") {
attrs |= EventAttributes.SpecialName;
return;
}
-#endif
if (cattrs != null) {
CustomAttributeBuilder[] new_array = new CustomAttributeBuilder [cattrs.Length + 1];
cattrs.CopyTo (new_array, 0);
}
}
-#if NET_2_0
[ComVisible (true)]
-#endif
public void SetCustomAttribute( ConstructorInfo con, byte[] binaryAttribute) {
if (con == null)
throw new ArgumentNullException ("con");
}
}
+#endif