[bcl] Remove NET_4_5 defines from class libs.
[mono.git] / mcs / class / corlib / System.Reflection / TypeDelegator.cs
index 3e7f4cafff975efb71494b0cf55ef29b89e90e13..8beffb64cd216b1469aabef6db6e0864f5a16685 100644 (file)
 using System;
 using System.Reflection;
 using System.Globalization;
+using System.Runtime.InteropServices;
 
 namespace System.Reflection {
 
+       [ComVisible (true)]
        [Serializable]
-       public class TypeDelegator : Type {
+       public class TypeDelegator : 
+               TypeInfo, IReflectableType
+       {
                protected Type typeImpl;
        
                protected TypeDelegator () {
@@ -99,6 +103,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 +154,7 @@ namespace System.Reflection {
                        return typeImpl.GetInterface (name, ignoreCase);
                }
 
+               [ComVisible (true)]
                public override InterfaceMapping GetInterfaceMap( Type interfaceType)
                {
                        return typeImpl.GetInterfaceMap (interfaceType);
@@ -244,42 +250,23 @@ 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 {
+               public override int MetadataToken {
                        get {
-                               throw new NotImplementedException ();
+                               return typeImpl.MetadataToken;
                        }
                }
 
-               public override bool ContainsGenericParameters {
-                       get {
-                               throw new NotImplementedException ();
-                       }
+               public override bool IsConstructedGenericType {
+                       get { return typeImpl.IsConstructedGenericType; }
                }
 
-               public override bool IsGenericParameter {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-               }
-
-               public override int GenericParameterPosition {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-               }
+               public override bool IsAssignableFrom (TypeInfo typeInfo)
+               {
+                       if (typeInfo == null)
+                               throw new ArgumentNullException ("typeInfo");
 
-               public override MethodInfo DeclaringMethod {
-                       get {
-                               throw new NotImplementedException ();
-                       }
+                       return IsAssignableFrom (typeInfo.AsType ());
                }
-#endif
 
        }
 }