diff --git a/src/generator.cs b/src/generator.cs index eac2a63cc54f..e8b5962e3601 100644 --- a/src/generator.cs +++ b/src/generator.cs @@ -107,7 +107,7 @@ public static AvailabilityBaseAttribute GetAvailability (this ICustomAttributePr string nwrap; if (parent_type != TypeManager.NSObject) { - if (Attribute.IsDefined (parent_type, TypeManager.ModelAttribute, false)) { + if (AttributeManager.HasAttribute (parent_type, TypeManager.ModelAttribute, false)) { foreach (PropertyInfo pinfo in parent_type.GetProperties (flags)) { bool toadd = true; var modelea = Generator.GetExportAttribute (pinfo, out nwrap); @@ -166,7 +166,7 @@ public static bool IsInternal (this Type type) Type parent_type = GetBaseType (type); if (parent_type != TypeManager.NSObject) { - if (Attribute.IsDefined (parent_type, TypeManager.ModelAttribute, false)) + if (AttributeManager.HasAttribute (parent_type, TypeManager.ModelAttribute, false)) foreach (MethodInfo minfo in parent_type.GetMethods ()) if (AttributeManager.HasAttribute (minfo, TypeManager.ExportAttribute, false)) methods.Add (minfo);