diff --git a/src/bgen/AttributeManager.cs b/src/bgen/AttributeManager.cs index 7386997296db..5c9b2731771a 100644 --- a/src/bgen/AttributeManager.cs +++ b/src/bgen/AttributeManager.cs @@ -390,7 +390,7 @@ IEnumerable CreateAttributeInstance (CustomAttributeData attribute, ICusto return convertedAttributes.OfType (); var expectedType = ConvertTypeToMeta (typeof (T), provider); - if (attribute.GetAttributeType () != expectedType && !IsSubclassOf (expectedType, attribute.GetAttributeType ())) + if (attribute.GetAttributeType () != expectedType && !attribute.GetAttributeType ().IsSubclassOf (expectedType)) return Enumerable.Empty (); System.Type attribType = ConvertTypeFromMeta (attribute.GetAttributeType (), provider); @@ -538,7 +538,7 @@ public bool HasAttribute (ICustomAttributeProvider provider) where T : Attrib var attrib = attribs [i]; if (attrib.GetAttributeType () == attribute_type) return true; - if (IsSubclassOf (attribute_type, attrib.GetAttributeType ())) + if (attrib.GetAttributeType ().IsSubclassOf (attribute_type)) return true; } @@ -580,10 +580,6 @@ public static ICustomAttributeProvider GetReturnTypeCustomAttributes (MethodInfo return method.ReturnParameter; } - static bool IsSubclassOf (Type base_class, Type derived_class) - { - return derived_class.IsSubclassOf (base_class); - } } public static class AttributeConversionManager { diff --git a/tests/monotouch-test/CoreBluetooth/CentralManagerTest.cs b/tests/monotouch-test/CoreBluetooth/CentralManagerTest.cs index 490c46da99f5..9f58a4070cd0 100644 --- a/tests/monotouch-test/CoreBluetooth/CentralManagerTest.cs +++ b/tests/monotouch-test/CoreBluetooth/CentralManagerTest.cs @@ -78,7 +78,7 @@ public void SetUp () { if (TestRuntime.IsInCI && TestRuntime.CheckXcodeVersion (14, 0)) TestRuntime.AssertNotDesktop (); // Looks like this particular test doesn't like Desktop + M1 bot machines - // iOS 13 and friends require bluetooth permission + // iOS 13 and friends require bluetooth permission if (TestRuntime.CheckXcodeVersion (11, 0)) TestRuntime.CheckBluetoothPermission (true); //known UUID for a heart monitor, more common, we want to find something and make sure we do not crash