Author: zoltan
Date: 2008-01-22 06:24:48 -0500 (Tue, 22 Jan 2008)
New Revision: 93507
Modified:
trunk/mcs/class/corlib/System.Reflection/ChangeLog
trunk/mcs/class/corlib/System.Reflection/MonoGenericClass.cs
Log:
2008-01-22 Zoltan Varga <[EMAIL PROTECTED]>
* MonoGenericClass.cs (Initialize): Simplify this a bit and add
comments for this
class.
Modified: trunk/mcs/class/corlib/System.Reflection/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.Reflection/ChangeLog 2008-01-22 11:23:02 UTC
(rev 93506)
+++ trunk/mcs/class/corlib/System.Reflection/ChangeLog 2008-01-22 11:24:48 UTC
(rev 93507)
@@ -1,3 +1,8 @@
+2008-01-22 Zoltan Varga <[EMAIL PROTECTED]>
+
+ * MonoGenericClass.cs (Initialize): Simplify this a bit and add
comments for this
+ class.
+
2008-01-20 Gert Driesen <[EMAIL PROTECTED]>
* AssemblyName.cs: Added support for Retargetable spec in FullName.
Modified: trunk/mcs/class/corlib/System.Reflection/MonoGenericClass.cs
===================================================================
--- trunk/mcs/class/corlib/System.Reflection/MonoGenericClass.cs
2008-01-22 11:23:02 UTC (rev 93506)
+++ trunk/mcs/class/corlib/System.Reflection/MonoGenericClass.cs
2008-01-22 11:24:48 UTC (rev 93507)
@@ -1,5 +1,5 @@
//
-// System.MonoType
+// System.Reflection.MonoGenericClass
//
// Sean MacIsaac ([EMAIL PROTECTED])
// Paolo Molaro ([EMAIL PROTECTED])
@@ -40,9 +40,15 @@
namespace System.Reflection
{
+ /*
+ * MonoGenericClass represents an instantiation of a generic
TypeBuilder. MS
+ * calls this class TypeBuilderInstantiation (a much better name). MS
returns
+ * NotImplementedException for many of the methods but we can't do that
as gmcs
+ * depends on them.
+ */
internal class MonoGenericClass : MonoType
{
- protected Type generic_type;
+ protected TypeBuilder generic_type;
bool initialized;
internal MonoGenericClass ()
@@ -82,14 +88,6 @@
private const BindingFlags flags = BindingFlags.Public |
BindingFlags.NonPublic |
BindingFlags.Static | BindingFlags.Instance |
BindingFlags.DeclaredOnly;
- EventInfo[] get_event_info ()
- {
- if (generic_type is TypeBuilder)
- return ((TypeBuilder)
generic_type).GetEvents_internal (flags);
- else
- return generic_type.GetEvents (flags);
- }
-
void initialize ()
{
if (initialized)
@@ -100,10 +98,10 @@
parent.initialize ();
initialize (generic_type.GetMethods (flags),
- generic_type.GetConstructors (flags),
- generic_type.GetFields (flags),
- generic_type.GetProperties (flags),
- get_event_info ());
+ generic_type.GetConstructors
(flags),
+ generic_type.GetFields (flags),
+ generic_type.GetProperties
(flags),
+ generic_type.GetEvents_internal
(flags));
initialized = true;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches