}
#if GENERICS
- public override bool HasGenericParameters {
- get {
- throw new NotImplementedException ();
- }
+ public extern override bool HasGenericParameters {
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ get;
}
- public override bool HasUnboundGenericParameters {
- get {
- throw new NotImplementedException ();
- }
+ public extern override bool HasUnboundGenericParameters {
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ get;
}
- public override bool IsUnboundGenericParameter {
- get {
- throw new NotImplementedException ();
- }
+ public extern override bool IsUnboundGenericParameter {
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ get;
}
- public override int GenericParameterPosition {
- get {
- throw new Exception ("Unimplemented");
- }
- }
#endif
}
}
}
#if GENERICS
- public Type [] GetGenericParameters ()
- {
- if (HasGenericParameters == false)
- return new Type [0];
-
- throw new Exception ("Unimplemented");
- }
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern Type [] GetGenericParameters ();
public abstract bool HasGenericParameters {
get;
get;
}
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ static extern Type GetGenericTypeDefinition (Type t);
+
public Type GetGenericTypeDefinition ()
{
- throw new Exception ("Unimplemented");
+ Type res = GetGenericTypeDefinition (this);
+ if (res == null)
+ throw new ArgumentException ();
+ return res;
}
- public Type IsGenericTypeDefinition ()
- {
- throw new Exception ("Unimplemented");
- }
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern Type IsGenericTypeDefinition ();
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ static extern Type BindGenericParameters (Type gt, Type [] types);
+
public Type BindGenericParameters (Type [] types)
{
- throw new Exception ("Unimplemented");
+ if (types == null)
+ throw new ArgumentNullException ("types");
+ foreach (Type t in types) {
+ if (t == null)
+ throw new ArgumentNullException ("types");
+ }
+ Type res = BindGenericParameters (this, types);
+ if (res == null)
+ throw new TypeLoadException ();
+ return res;
}
public abstract bool IsUnboundGenericParameter {
get;
}
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ extern int GetGenericParameterPosition ();
+
public virtual int GenericParameterPosition {
get {
- throw new Exception ("Unimplemented");
+ int res = GetGenericParameterPosition ();
+ if (res < 0)
+ throw new ArgumentException ();
+ return res;
}
}
#endif