ecore.cs : Added support for Implicit numeric conversions
[mono.git] / mcs / mbas / typemanager.cs
index 1b44fdf9534d63ae9505b3780deb74201f14188c..608ee89dfee433cef07a380b7c1808b59821cd9c 100644 (file)
@@ -148,6 +148,7 @@ public class TypeManager {
        static public ConstructorInfo void_decimal_ctor_five_args;
        static public ConstructorInfo void_datetime_ctor_ticks_arg;
        static public ConstructorInfo unverifiable_code_ctor;
+       static public ConstructorInfo default_member_ctor;
        
        // <remarks>
        //   Holds the Array of Assemblies that have been loaded
@@ -1033,6 +1034,8 @@ public class TypeManager {
                unverifiable_code_ctor = GetConstructor (
                        unverifiable_code_type, void_arg);
                
+               default_member_ctor = GetConstructor (
+                       default_member_type, string_);
        }
 
        const BindingFlags instance_and_static = BindingFlags.Static | BindingFlags.Instance;
@@ -1866,17 +1869,17 @@ public class TypeManager {
                        if (t.IsInterface) {
                                Interface i = LookupInterface (t);
 
-                               if ((i == null) || (i.IndexerName == null))
+                               if ((i == null) || (i.DefaultPropName == null))
                                        return "Item";
 
-                               return i.IndexerName;
+                               return i.DefaultPropName;
                        } else {
                                TypeContainer tc = LookupTypeContainer (t);
 
-                               if ((tc == null) || (tc.IndexerName == null))
+                               if ((tc == null) || (tc.DefaultPropName == null))
                                        return "Item";
 
-                               return tc.IndexerName;
+                               return tc.DefaultPropName;
                        }
                }