Skip to content
This repository was archived by the owner on Jul 6, 2026. It is now read-only.
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 numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;

using Mono.Cecil;

Expand DownExpand 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