2010-03-27 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mcs / class / corlib / System.Reflection / TypeDelegator.cs
index 3e7f4cafff975efb71494b0cf55ef29b89e90e13..32c143b75dbd80a5c6dc9c4418f66f8bb1464055 100644 (file)
 using System;
 using System.Reflection;
 using System.Globalization;
+using System.Runtime.InteropServices;
 
 namespace System.Reflection {
 
+       [ComVisible (true)]
        [Serializable]
        public class TypeDelegator : Type {
                protected Type typeImpl;
@@ -99,6 +101,7 @@ namespace System.Reflection {
                        return typeImpl.GetConstructor (bindingAttr, binder, callConvention, types, modifiers);
                }
 
+               [ComVisible (true)]
                public override ConstructorInfo[] GetConstructors( BindingFlags bindingAttr)
                {
                        return typeImpl.GetConstructors (bindingAttr);
@@ -149,6 +152,7 @@ namespace System.Reflection {
                        return typeImpl.GetInterface (name, ignoreCase);
                }
 
+               [ComVisible (true)]
                public override InterfaceMapping GetInterfaceMap( Type interfaceType)
                {
                        return typeImpl.GetInterfaceMap (interfaceType);
@@ -244,42 +248,11 @@ namespace System.Reflection {
                        return typeImpl.IsValueType;
                }
 
-#if NET_2_0 || BOOTSTRAP_NET_2_0
-               public override Type[] GetGenericArguments ()
-               {
-                       throw new NotImplementedException ();
-               }
-
-               public override bool HasGenericArguments {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-               }
-
-               public override bool ContainsGenericParameters {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-               }
-
-               public override bool IsGenericParameter {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-               }
-
-               public override int GenericParameterPosition {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-               }
-
-               public override MethodInfo DeclaringMethod {
+               public override int MetadataToken {
                        get {
-                               throw new NotImplementedException ();
+                               return typeImpl.MetadataToken;
                        }
                }
-#endif
 
        }
 }