using System.Security.Permissions;
namespace System.Reflection.Emit {
+
public sealed class TypeBuilder : Type {
private string tname;
private string nspace;
throw new ArgumentException ("attributes", "Interface method must be abstract and virtual.");
if (returnType == null)
- returnType = typeof (void);
+ returnType = pmodule.assemblyb.corlib_void_type;
MethodBuilder res = new MethodBuilder (this, name, attributes, callingConvention, returnType, parameterTypes);
append_method (res);
return res;
throw not_supported ();
}
- [MonoTODO]
public override EventInfo GetEvent (string name, BindingFlags bindingAttr) {
- if (name == null)
- throw new ArgumentNullException ("name");
-
- throw new NotImplementedException ();
+ throw not_supported ();
}
public override EventInfo[] GetEvents (BindingFlags bindingAttr) {
+ // FIXME: Under MS.NET, this throws a NotImplementedException
+ // But mcs calls this method. How can that be?
return new EventInfo [0];
}
- [MonoTODO]
public override FieldInfo GetField( string name, BindingFlags bindingAttr) {
- if (name == null)
- throw new ArgumentNullException ("name");
-
- throw new NotImplementedException ();
+ throw not_supported ();
}
public override FieldInfo[] GetFields (BindingFlags bindingAttr) {
return result;
}
- [MonoTODO]
public override Type GetInterface (string name, bool ignoreCase) {
- if (name == null)
- throw new ArgumentNullException ("name");
-
- throw new NotImplementedException ();
+ throw not_supported ();
}
public override Type[] GetInterfaces () {
}
}
- [MonoTODO]
- public override MemberInfo[] GetMembers( BindingFlags bindingAttr) {
- // FIXME
- throw new NotImplementedException ();
+ public override MemberInfo[] GetMember (string name, MemberTypes type,
+ BindingFlags bindingAttr) {
+ throw not_supported ();
+ }
+
+ public override MemberInfo[] GetMembers (BindingFlags bindingAttr) {
+ throw not_supported ();
}
public override MethodInfo[] GetMethods (BindingFlags bindingAttr) {
return result;
}
- [MonoTODO]
protected override MethodInfo GetMethodImpl( string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) {
- // FIXME
- throw new NotImplementedException ();
+ throw not_supported ();
}
- [MonoTODO]
public override Type GetNestedType( string name, BindingFlags bindingAttr) {
- if (name == null)
- throw new ArgumentNullException ("name");
-
- throw new NotImplementedException ();
+ throw not_supported ();
}
public override Type[] GetNestedTypes (BindingFlags bindingAttr) {
return result;
}
- [MonoTODO]
protected override PropertyInfo GetPropertyImpl( string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers) {
- // FIXME
- throw new NotImplementedException ();
+ throw not_supported ();
}
protected override bool HasElementTypeImpl () {