#if NET_4_0
public virtual bool Equals (Type o)
{
+ if ((object)o == this)
+ return true;
+ if ((object)o == null)
+ return false;
+ Type me = UnderlyingSystemType;
+ if ((object)me == null)
+ return false;
+
+ o = o.UnderlyingSystemType;
+ if ((object)o == null)
+ return false;
+ if ((object)o == this)
+ return true;
+ return me.EqualsInternal (o);
+ }
#else
public bool Equals (Type o)
{
if (o == this)
return true;
-#endif
if (o == null)
return false;
Type me = UnderlyingSystemType;
return false;
return me.EqualsInternal (o.UnderlyingSystemType);
}
-
+#endif
#if NET_4_0
[MonoTODO ("Implement it properly once 4.0 impl details are known.")]
public static bool operator == (Type left, Type right)
}
return false;
}
+
+ public static Type GetType (string typeName, Func<AssemblyName,Assembly> assemblyResolver, Func<Assembly,string,bool,Type> typeResolver)
+ {
+ return GetType (typeName, assemblyResolver, typeResolver, false, false);
+ }
+
+ public static Type GetType (string typeName, Func<AssemblyName,Assembly> assemblyResolver, Func<Assembly,string,bool,Type> typeResolver, bool throwOnError)
+ {
+ return GetType (typeName, assemblyResolver, typeResolver, throwOnError, false);
+ }
+
+ public static Type GetType (string typeName, Func<AssemblyName,Assembly> assemblyResolver, Func<Assembly,string,bool,Type> typeResolver, bool throwOnError, bool ignoreCase)
+ {
+ TypeSpec spec = TypeSpec.Parse (typeName);
+ return spec.Resolve (assemblyResolver, typeResolver, throwOnError, ignoreCase);
+ }
+ public virtual bool IsSecurityTransparent
+ {
+ get { throw CreateNIE (); }
+ }
- public static Type GetType (string typeName, Func<AssemblyName,Assembly> assemblyResolver, Func<Assembly,string,bool,Type> typeResolver)
- {
- return GetType (typeName, assemblyResolver, typeResolver, false, false);
- }
-
- public static Type GetType (string typeName, Func<AssemblyName,Assembly> assemblyResolver, Func<Assembly,string,bool,Type> typeResolver, bool throwOnError)
- {
- return GetType (typeName, assemblyResolver, typeResolver, throwOnError, false);
- }
+ public virtual bool IsSecurityCritical
+ {
+ get { throw CreateNIE (); }
+ }
- public static Type GetType (string typeName, Func<AssemblyName,Assembly> assemblyResolver, Func<Assembly,string,bool,Type> typeResolver, bool throwOnError, bool ignoreCase)
- {
- TypeSpec spec = TypeSpec.Parse (typeName);
- return spec.Resolve (assemblyResolver, typeResolver, throwOnError, ignoreCase);
- }
+ public virtual bool IsSecuritySafeCritical
+ {
+ get { throw CreateNIE (); }
+ }
#endif
[MethodImplAttribute(MethodImplOptions.InternalCall)]
}
}
if ((memberType & MemberTypes.Property) != 0) {
- PropertyInfo[] c;
- int count = l.Count;
- Type ptype;
+ PropertyInfo[] c = GetProperties (bindingAttr);
+
+
if (filter != null) {
- ptype = this;
- while ((l.Count == count) && (ptype != null)) {
- c = ptype.GetProperties (bindingAttr);
- foreach (MemberInfo m in c) {
- if (filter (m, filterCriteria))
- l.Add (m);
- }
- ptype = ptype.BaseType;
+ foreach (MemberInfo m in c) {
+ if (filter (m, filterCriteria))
+ l.Add (m);
}
} else {
- c = GetProperties (bindingAttr);
l.AddRange (c);
}
+
}
if ((memberType & MemberTypes.Event) != 0) {
EventInfo[] c = GetEvents (bindingAttr);
}
}
+ internal virtual Type InternalResolve ()
+ {
+ return UnderlyingSystemType;
+ }
+
internal bool IsSystemType {
get {
return _impl.Value != IntPtr.Zero;