Author: atsushi
Date: 2007-11-20 01:53:21 -0500 (Tue, 20 Nov 2007)
New Revision: 89964
Modified:
trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog
trunk/mcs/class/corlib/System.Reflection.Emit/GenericTypeParameterBuilder.cs
trunk/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
Log:
2007-11-20 Atsushi Enomoto <[EMAIL PROTECTED]>
* MethodBuilder.cs : implemented ContainsGenericParameters().
* GenericTypeParameterBuilder.cs : removed most of extra members
and added missing members for 2.0 API.
Modified: trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog 2007-11-20
04:42:46 UTC (rev 89963)
+++ trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog 2007-11-20
06:53:21 UTC (rev 89964)
@@ -1,3 +1,9 @@
+2007-11-20 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * MethodBuilder.cs : implemented ContainsGenericParameters().
+ * GenericTypeParameterBuilder.cs : removed most of extra members
+ and added missing members for 2.0 API.
+
2007-11-18 Miguel de Icaza <[EMAIL PROTECTED]>
* SignatureHelper.cs: Implement Equals and GetHashCode
Modified:
trunk/mcs/class/corlib/System.Reflection.Emit/GenericTypeParameterBuilder.cs
===================================================================
---
trunk/mcs/class/corlib/System.Reflection.Emit/GenericTypeParameterBuilder.cs
2007-11-20 04:42:46 UTC (rev 89963)
+++
trunk/mcs/class/corlib/System.Reflection.Emit/GenericTypeParameterBuilder.cs
2007-11-20 06:53:21 UTC (rev 89964)
@@ -85,6 +85,7 @@
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern void initialize ();
+ [ComVisible (true)]
public override bool IsSubclassOf (Type c)
{
if (BaseType == null)
@@ -107,6 +108,7 @@
throw not_supported ();
}
+ [ComVisible (true)]
public override ConstructorInfo[] GetConstructors (BindingFlags
bindingAttr)
{
throw not_supported ();
@@ -117,6 +119,11 @@
throw not_supported ();
}
+ public override EventInfo[] GetEvents ()
+ {
+ throw not_supported ();
+ }
+
public override EventInfo[] GetEvents (BindingFlags bindingAttr)
{
throw not_supported ();
@@ -147,6 +154,11 @@
throw not_supported ();
}
+ public override MemberInfo[] GetMember (string name,
MemberTypes type, BindingFlags bindingAttr)
+ {
+ throw not_supported ();
+ }
+
public override MethodInfo [] GetMethods (BindingFlags
bindingAttr)
{
throw not_supported ();
@@ -188,6 +200,11 @@
return false;
}
+ public override bool IsAssignableFrom (Type c)
+ {
+ throw not_supported ();
+ }
+
protected override bool IsArrayImpl ()
{
return false;
@@ -272,8 +289,10 @@
throw not_supported ();
}
- public override MemberTypes MemberType {
- get { return MemberTypes.TypeInfo; }
+ [ComVisible (true)]
+ public override InterfaceMapping GetInterfaceMap (Type
interfaceType)
+ {
+ throw not_supported ();
}
public override string Name {
@@ -300,11 +319,6 @@
get { throw not_supported (); }
}
- public override int GetArrayRank ()
- {
- throw not_supported ();
- }
-
public override Type[] GetGenericArguments ()
{
throw not_supported ();
@@ -323,16 +337,18 @@
get { return true; }
}
+ public override bool IsGenericType {
+ get { return false; }
+ }
+
+ public override bool IsGenericTypeDefinition {
+ get { return false; }
+ }
+
public override int GenericParameterPosition {
get { return index; }
}
- public override GenericParameterAttributes
GenericParameterAttributes {
- get {
- return attrs;
- }
- }
-
public override Type[] GetGenericParameterConstraints ()
{
if (base_type == null) {
@@ -371,6 +387,12 @@
}
}
+ [MonoTODO ("unverified implementation")]
+ public void SetCustomAttribute (ConstructorInfo con, byte []
binaryAttribute)
+ {
+ SetCustomAttribute (new CustomAttributeBuilder (con,
binaryAttribute));
+ }
+
private Exception not_supported ()
{
return new NotSupportedException ();
@@ -380,6 +402,48 @@
{
return name;
}
+
+ [MonoTODO]
+ public override bool Equals (object other)
+ {
+ return base.Equals (other);
+ }
+
+ [MonoTODO]
+ public override int GetHashCode ()
+ {
+ return base.GetHashCode ();
+ }
+
+ [MonoTODO]
+ public override Type MakeArrayType ()
+ {
+ return base.MakeArrayType ();
+ }
+
+ [MonoTODO]
+ public override Type MakeArrayType (int rank)
+ {
+ return base.MakeArrayType (rank);
+ }
+
+ [MonoTODO]
+ public override Type MakeByRefType ()
+ {
+ return base.MakeByRefType ();
+ }
+
+ [MonoTODO]
+ public override Type MakeGenericType (params Type []
typeArguments)
+ {
+ return base.MakeGenericType (typeArguments);
+ }
+
+ [MonoTODO]
+ public override Type MakePointerType ()
+ {
+ return base.MakePointerType ();
+ }
}
}
#endif
Modified: trunk/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
===================================================================
--- trunk/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
2007-11-20 04:42:46 UTC (rev 89963)
+++ trunk/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
2007-11-20 06:53:21 UTC (rev 89964)
@@ -118,6 +118,12 @@
charset = nativeCharset;
}
+#if NET_2_0
+ public override bool ContainsGenericParameters {
+ get { throw new NotSupportedException (); }
+ }
+#endif
+
public bool InitLocals {
get {return init_locals;}
set {init_locals = value;}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches