Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;

using Mono.Cecil;

Expand Down Expand Up @@ -74,7 +73,12 @@ public static bool IsSubclassOf (this TypeDefinition type, string typeName) =>

public static bool IsSubclassOf (this TypeDefinition type, string typeName, TypeDefinitionCache cache)
{
return type.GetTypeAndBaseTypes (cache).Any (t => t.FullName == typeName);
foreach (var t in type.GetTypeAndBaseTypes (cache)) {
if (t.FullName == typeName) {
return true;
}
}
return false;
}

[Obsolete ("Use the TypeDefinitionCache overload for better performance.")]
Expand Down